Contents
About this report
Report parameters
Contexts
No contexts were selected, so all contexts were included by default.
Sites
The following sites were included:
- http://localhost:3000
(If no sites were selected, all sites were included by default.)
An included site must also be within one of the included contexts for its data to be included in the report.
Risk levels
Included: Alto, Medio, Bajo, Informativo
Excluded: None
Confidence levels
Included: Confirmado por Usuario, Alta, Media, Baja
Excluded: Confirmado por Usuario, Alta, Media, Baja, Falso positivo
Summaries
Alert counts by risk and confidence
Confidence | ||||||
---|---|---|---|---|---|---|
Confirmado por Usuario | Alta | Media | Baja | Total | ||
Risk | Alto | 0 (0,0 %) |
0 (0,0 %) |
0 (0,0 %) |
1 (9,1 %) |
1 (9,1 %) |
Medio | 0 (0,0 %) |
1 (9,1 %) |
1 (9,1 %) |
1 (9,1 %) |
3 (27,3 %) |
|
Bajo | 0 (0,0 %) |
0 (0,0 %) |
2 (18,2 %) |
1 (9,1 %) |
3 (27,3 %) |
|
Informativo | 0 (0,0 %) |
0 (0,0 %) |
3 (27,3 %) |
1 (9,1 %) |
4 (36,4 %) |
|
Total | 0 (0,0 %) |
1 (9,1 %) |
6 (54,5 %) |
4 (36,4 %) |
11 (100%) |
Alert counts by site and risk
Risk | |||||
---|---|---|---|---|---|
Alto (= Alto) |
Medio (>= Medio) |
Bajo (>= Bajo) |
Informativo (>= Informativo) |
||
Site | http://localhost:3000 | 1 (1) |
3 (4) |
3 (7) |
4 (11) |
Alert counts by alert type
Alert type | Risk | Count |
---|---|---|
Metadatos de la Nube Potencialmente Expuestos | Alto | 1 (9,1 %) |
Ausencia de Ttokens Anti-CSRF | Medio | 4 (36,4 %) |
Cabecera Content Security Policy (CSP) no configurada | Medio | 8 (72,7 %) |
Falta de cabecera Anti-Clickjacking | Medio | 6 (54,5 %) |
Divulgación de la marca de hora - Unix | Bajo | 1 (9,1 %) |
El servidor divulga información mediante un campo(s) de encabezado de respuesta HTTP ''''X-Powered-By'''' | Bajo | 8 (72,7 %) |
X-Content-Type-Options Header Missing | Bajo | 26 (236,4 %) |
Divulgación de Información - Información sensible en URL | Informativo | 4 (36,4 %) |
Divulgación de información - Comentarios sospechosos | Informativo | 40 (363,6 %) |
Modern Web Application | Informativo | 2 (18,2 %) |
User Agent Fuzzer | Informativo | 12 (109,1 %) |
Total | 11 |
Alerts
-
Risk=Alto, Confidence=Baja (1)
-
http://localhost:3000 (1)
-
Metadatos de la Nube Potencialmente Expuestos (1)
GET http://localhost:3000/latest/meta-data/
Alert tags Alert description El Ataque a los Metadatos de la Nube intenta abusar de un servidor NGINX mal configurado para acceder a la instancia de los metadatos mantenidos por proveedores de servicios en la nube como AWS, GCP y Azure.
Todos estos proveedores proporcionan metadatos a través de una dirección IP interna no enrutable '169.254.169.254' - esta puede ser expuesta por servidores NGINX configurados incorrectamente y accedida utilizando esta dirección IP en el campo head Host.
Traducción realizada con la versión gratuita del traductor www.DeepL.com/Translator
Other info Según el código de estado de la respuesta correcta, es posible que se hayan devuelto metadatos de nube en la respuesta (response). Compruebe los datos de respuesta para ver si se ha devuelto algún metadato de nube.
Los metadatos devueltos pueden incluir información que permitiría a un atacante comprometer completamente el sistema.
Request Request line and header section (247 bytes)
GET http://localhost:3000/latest/meta-data/ HTTP/1.1 host: 169.254.169.254 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (174 bytes)
HTTP/1.1 308 Permanent Redirect location: /latest/meta-data refresh: 0;url=/latest/meta-data date: Fri, 01 Dec 2023 22:59:13 GMT connection: close content-length: 17
Response body (17 bytes)
/latest/meta-data
Attack 169.254.169.254
Solution No confíe en ningún dato de usuario en las configuraciones de NGINX. En este caso, probablemente sea el uso de la variable $host que se establece desde el encabezado (header) 'Host' y puede estar controlado por un atacante.
-
-
-
Risk=Medio, Confidence=Alta (1)
-
http://localhost:3000 (1)
-
Cabecera Content Security Policy (CSP) no configurada (1)
GET http://localhost:3000/
Alert tags Alert description La Política de seguridad de contenido (CSP) es una capa adicional de seguridad que ayuda a detectar y mitigar ciertos tipos de ataques, incluidos Cross Site Scripting (XSS) y ataques de inyección de datos. Estos ataques se utilizan para todo, desde el robo de datos hasta la desfiguración del sitio o la distribución de malware. CSP proporciona un conjunto de encabezados HTTP estándar que permiten a los propietarios de sitios web declarar fuentes de contenido aprobadas que los navegadores deberían poder cargar en esa página; los tipos cubiertos son JavaScript, CSS, marcos HTML, fuentes, imágenes y objetos incrustados como applets de Java, ActiveX, archivos de audio y video.
Request Request line and header section (229 bytes)
GET http://localhost:3000/ HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:57:51 GMT connection: close content-length: 56229
Response body (56229 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(dashboard)/layout.css?v=1701471471735" data-precedence="next_static/css/app/(dashboard)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik</title><meta name="description" content="Página de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-offwhite __className_e66fe9"><div><div class="2xl:hidden"><nav class="bg-navbar-color p-5 space-y-5"><div class="grid grid-cols-2"><section class="flex space-x-2 items-center"><figure class="max-w-[80px]"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure></section><section class="flex justify-end pr-2 items-center"><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg></a></section></div><section><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></section></nav></div><div class="hidden 2xl:block"><nav class="bg-navbar-color"><div class="grid grid-cols-4 2xl:grid-cols-5 justify-items-stretch gap-4 2xl:gap-4 border-b border-b-gray-border 2xl:px-6 px-4 py-4 2xl:items-center"><figure class="flex col-span-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="2xl:hidden"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#1C1C1C"></path></svg><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure><div class="col-span-1"></div><div class="col-span-2 flex items-center "><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></div><div class="col-span-1"><ul class="flex justify-end text-center align-middle text-white text-sm"><li><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg><p>Iniciar Sesión</p></a></li></ul></div></div></nav></div></div><main class="grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48"><section class="col-span-4 2xl:col-span-8"><main class="space-y-7"><div class="fixed bottom-5 right-5"> <div class="fixed bottom-5 right-5 md:right-5 z-50 space-y-4 md:space-y-0 md:flex md:flex-col p-2"><a target="_blank" rel="noopener noreferrer" href="https://www.instagram.com/glik.ve/"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="#000000"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://www.tiktok.com/@glik7"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></a></div></div><figure><img alt="Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS" loading="lazy" width="1920" height="1080" decoding="async" data-nimg="1" class="mx-auto mt-5" style="color:transparent" src="/_next/static/media/glik_banner.126325ef.webp"/></figure><h3 class="text-lg font-bold 2xl:text-3xl text-center 2xl:text-left">Modelos disponibles</h3><div class="space-y-3 2xl:space-y-0 2xl:grid 2xl:grid-cols-8 2xl:gap-4 2xl:justify-items-stretch pb-8"></div></main></section></main><div class="mx-auto max-md:hidden mt-2"><footer class="bg-navbar-color py-1 text-black lg:px-48"><div class="flex align-middle mt-4"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras blancas y foto de un conejo" loading="lazy" width="201" height="70" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></div><hr class="my-8 h-0.5 border-t-0 bg-neutral-100 opacity-50 dark:opacity-50"/><div class="px-4 max-w-full mt-8 md:grid md:grid-cols-4 gap-4 2xl:grid 2xl:grid-cols-4 justify-items-center align-middle"> <div class="col-span-1"><p class="my-2 text-white font-bold">$ USD</p><p class="my-2 text-white">Copyright Glik.ve</p><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M24.9292 8.68964C25.0796 10.0467 24.5379 11.3839 23.7462 12.3668C22.9201 13.3345 21.5985 14.0746 20.3113 13.9793C20.1428 12.6735 20.795 11.285 21.5251 10.4379C22.3503 9.47652 23.7834 8.74 24.9292 8.68964Z" fill="white"></path><path d="M29.1431 16.5179C28.9994 16.603 26.6188 18.0136 26.6449 20.8903C26.6757 24.3643 29.7066 25.5127 29.7429 25.5244C29.7248 25.6053 29.2682 27.1836 28.1314 28.7825C27.1821 30.1926 26.1875 31.5712 24.6077 31.5946C23.8564 31.6122 23.3491 31.3979 22.8205 31.1745C22.2694 30.9416 21.6951 30.6989 20.7968 30.6989C19.8445 30.6989 19.2447 30.9496 18.6663 31.1914C18.1659 31.4005 17.6814 31.603 16.9986 31.6306C15.494 31.6854 14.3445 30.1269 13.3607 28.7294C11.3942 25.8778 9.8633 20.6934 11.9159 17.1655C12.9105 15.4352 14.724 14.321 16.6625 14.2913C17.5162 14.274 18.3349 14.6006 19.0526 14.8869C19.6015 15.1058 20.0913 15.3012 20.4924 15.3012C20.8448 15.3012 21.3208 15.1137 21.8757 14.895C22.7501 14.5505 23.8201 14.1289 24.9102 14.2428C25.6557 14.2643 27.7772 14.535 29.1459 16.5162L29.1431 16.5179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M40.0404 9.46415H37.9139V15.7451H40.0404C41.9213 15.7451 43.0261 14.5829 43.0261 12.6025C43.0261 10.6263 41.9169 9.46415 40.0404 9.46415ZM38.7031 10.1693V15.04H39.9877C41.4215 15.04 42.2194 14.1694 42.2194 12.6112C42.2194 11.0398 41.4258 10.1693 39.9877 10.1693H38.7031Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M46.0745 15.8235C44.8118 15.8235 43.9612 14.9225 43.9612 13.4817C43.9612 12.0366 44.8118 11.1399 46.0745 11.1399C47.3328 11.1399 48.1834 12.0366 48.1834 13.4817C48.1834 14.9225 47.3328 15.8235 46.0745 15.8235ZM47.4074 13.4817C47.4074 14.5481 46.8812 15.1575 46.0745 15.1575C45.2678 15.1575 44.7372 14.5481 44.7372 13.4817C44.7372 12.4153 45.2678 11.8059 46.0745 11.8059C46.8812 11.8059 47.4074 12.4153 47.4074 13.4817Z" fill="white"></path><path d="M53.003 15.7451H53.7791L55.0506 11.2183H54.2964L53.3845 14.9007H53.367L52.3322 11.2183H51.5956L50.5653 14.9007H50.5478L49.6358 11.2183H48.8773L50.1532 15.7451H50.9292L51.9552 12.2412H51.9727L53.003 15.7451Z" fill="white"></path><path d="M56.6915 11.2183H55.9725V15.7451H56.7354V13.0813C56.7354 12.3152 57.2045 11.8103 57.9235 11.8103C58.625 11.8103 58.9714 12.2107 58.9714 12.942V15.7451H59.7343V12.807C59.7343 11.7798 59.1556 11.1399 58.1559 11.1399C57.45 11.1399 56.9633 11.4533 56.7091 11.9408H56.6915V11.2183Z" fill="white"></path><path d="M61.042 9.46415V15.7451H61.8049V9.46415H61.042Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.911 13.4817C62.911 14.9225 63.7615 15.8235 65.0243 15.8235C66.2826 15.8235 67.1332 14.9225 67.1332 13.4817C67.1332 12.0366 66.2826 11.1399 65.0243 11.1399C63.7615 11.1399 62.911 12.0366 62.911 13.4817ZM65.0242 15.1575C65.831 15.1575 66.3571 14.5481 66.3571 13.4817C66.3571 12.4153 65.831 11.8059 65.0242 11.8059C64.2175 11.8059 63.687 12.4153 63.687 13.4817C63.687 14.5481 64.2175 15.1575 65.0242 15.1575Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.5326 15.8235C68.625 15.8235 68.0156 15.2794 68.0156 14.4654C68.0156 13.6906 68.6163 13.2031 69.6685 13.1422L70.9751 13.0682V12.6895C70.9751 12.1367 70.6068 11.8059 69.9754 11.8059C69.3879 11.8059 69.0196 12.0801 68.9232 12.5241H68.1866C68.2392 11.7406 68.9144 11.1399 69.993 11.1399C71.0628 11.1399 71.738 11.7145 71.738 12.6155V15.7451H71.0145V14.966H70.997C70.7252 15.484 70.1464 15.8235 69.5326 15.8235ZM70.9751 14.0258C70.9751 14.6787 70.4226 15.1793 69.7036 15.1793C69.1555 15.1793 68.7916 14.8963 68.7916 14.4654C68.7916 14.0389 69.1424 13.769 69.7562 13.7298L70.9751 13.6558V14.0258Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M72.7826 13.4817C72.7826 14.9007 73.5718 15.8235 74.7337 15.8235C75.3914 15.8235 75.9131 15.5014 76.2069 14.979H76.22V15.7451H76.9478V9.46415H76.1849V11.9539H76.1674C75.8956 11.4577 75.3694 11.1399 74.7162 11.1399C73.5674 11.1399 72.7826 12.0627 72.7826 13.4817ZM74.8784 11.8059C74.0717 11.8059 73.5631 12.4588 73.5631 13.4817C73.5631 14.509 74.0717 15.1575 74.8784 15.1575C75.6632 15.1575 76.1893 14.4959 76.1893 13.4817C76.1893 12.4719 75.6632 11.8059 74.8784 11.8059Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M82.3079 15.8235C81.0452 15.8235 80.1946 14.9225 80.1946 13.4817C80.1946 12.0366 81.0452 11.1399 82.3079 11.1399C83.5663 11.1399 84.4168 12.0366 84.4168 13.4817C84.4168 14.9225 83.5663 15.8235 82.3079 15.8235ZM83.6408 13.4817C83.6408 14.5481 83.1147 15.1575 82.3079 15.1575C81.5012 15.1575 80.9707 14.5481 80.9707 13.4817C80.9707 12.4153 81.5012 11.8059 82.3079 11.8059C83.1147 11.8059 83.6408 12.4153 83.6408 13.4817Z" fill="white"></path><path d="M86.2025 11.2183H85.4834V15.7451H86.2463V13.0813C86.2463 12.3152 86.7154 11.8103 87.4345 11.8103C88.136 11.8103 88.4824 12.2107 88.4824 12.942V15.7451H89.2453V12.807C89.2453 11.7798 88.6665 11.1399 87.6669 11.1399C86.961 11.1399 86.4743 11.4533 86.22 11.9408H86.2025V11.2183Z" fill="white"></path><path d="M93.6627 10.1258H92.8998V11.2183H92.2202V11.8407H92.8998V14.5699C92.8998 15.4404 93.2243 15.7799 94.0617 15.7799C94.2414 15.7799 94.4519 15.7669 94.544 15.7451V15.1096C94.4914 15.1183 94.316 15.1314 94.2283 15.1314C93.8381 15.1314 93.6627 14.9442 93.6627 14.5307V11.8407H94.5484V11.2183H93.6627V10.1258Z" fill="white"></path><path d="M95.6982 9.46415V15.7451H96.4611V13.1074C96.4611 12.3239 96.9303 11.8103 97.6888 11.8103C98.4034 11.8103 98.7673 12.2412 98.7673 12.9594V15.7451H99.5302V12.8201C99.5302 11.8103 98.9252 11.1399 97.9255 11.1399C97.2328 11.1399 96.733 11.4359 96.4787 11.9408H96.4611V9.46415H95.6982Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M104.573 14.448H103.824C103.697 14.8746 103.271 15.1662 102.693 15.1662C101.873 15.1662 101.36 14.596 101.36 13.7298V13.6863H104.63V13.399C104.63 12.0279 103.872 11.1399 102.64 11.1399C101.382 11.1399 100.575 12.0932 100.575 13.4991C100.575 14.9225 101.368 15.8235 102.675 15.8235C103.67 15.8235 104.442 15.2402 104.573 14.448ZM102.627 11.7972C101.912 11.7972 101.412 12.3413 101.364 13.0943H103.841C103.824 12.3369 103.346 11.7972 102.627 11.7972Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M45.3018 31.1427L44.197 27.9019H39.5933L38.4884 31.1427H36.5382L40.8991 19.1517H42.9247L47.2856 31.1427H45.3018ZM40.0704 26.4061L41.87 21.1461H41.9202L43.7198 26.4061H40.0704Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.1019 26.7718C57.1019 24.0046 55.6287 22.2596 53.3939 22.2596C52.1216 22.2596 51.1088 22.8994 50.5898 23.9049H50.5564V22.4008H48.807V34.0345H50.6149V29.7051H50.6568C51.159 30.6773 52.1634 31.2922 53.4274 31.2922C55.6371 31.2922 57.1019 29.5389 57.1019 26.7718ZM52.9168 29.7716C54.3481 29.7716 55.2437 28.6082 55.2437 26.7718C55.2437 24.9436 54.3481 23.7719 52.9168 23.7719C51.5357 23.7719 50.6066 24.9685 50.6066 26.7718C50.6066 28.5916 51.5273 29.7716 52.9168 29.7716Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.4864 22.2596C65.7213 22.2596 67.1944 24.0046 67.1944 26.7718C67.1944 29.5389 65.7296 31.2922 63.5199 31.2922C62.256 31.2922 61.2515 30.6773 60.7493 29.7051H60.7075V34.0345H58.8995V22.4008H60.6489V23.9049H60.6824C61.2013 22.8994 62.2141 22.2596 63.4864 22.2596ZM65.3362 26.7718C65.3362 28.6082 64.4406 29.7716 63.0093 29.7716C61.6198 29.7716 60.6991 28.5916 60.6991 26.7718C60.6991 24.9685 61.6282 23.7719 63.0093 23.7719C64.4406 23.7719 65.3362 24.9436 65.3362 26.7718Z" fill="white"></path><path d="M74.4056 27.8022H72.5558C72.673 29.971 74.4809 31.3421 77.1594 31.3421C80.0221 31.3421 81.8217 29.9378 81.8217 27.6941C81.8217 25.9408 80.7921 24.9519 78.3145 24.3702L76.9837 24.0462C75.4268 23.6639 74.7906 23.1653 74.7906 22.3177C74.7906 21.2541 75.7867 20.5228 77.2431 20.5228C78.6996 20.5228 79.6956 21.2458 79.8044 22.4424H81.6291C81.5705 20.3733 79.8212 18.9523 77.2682 18.9523C74.6902 18.9523 72.8739 20.3733 72.8739 22.4424C72.8739 24.1126 73.9034 25.143 76.1215 25.6749L77.6868 26.0488C79.252 26.4311 79.9132 26.9878 79.9132 27.9185C79.9132 28.9905 78.8167 29.7716 77.2934 29.7716C75.703 29.7716 74.5395 28.9905 74.4056 27.8022Z" fill="white"></path><path d="M86.0383 20.3317H84.2219V22.4008H82.9413V23.8218H84.2219V28.8409C84.2219 30.5278 84.9167 31.2008 86.6995 31.2008C87.1013 31.2008 87.5031 31.1676 87.704 31.1177V29.6968C87.5868 29.7217 87.2938 29.7383 87.1097 29.7383C86.3731 29.7383 86.0383 29.3976 86.0383 28.6414V23.8218H87.7123V22.4008H86.0383V20.3317Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M88.9994 26.7718C88.9994 29.5888 90.6567 31.3089 93.1761 31.3089C95.6956 31.3089 97.3529 29.5888 97.3529 26.7718C97.3529 23.9631 95.6872 22.2429 93.1761 22.2429C90.665 22.2429 88.9994 23.9631 88.9994 26.7718ZM93.1761 29.8297C94.5991 29.8297 95.5114 28.7162 95.5114 26.7718C95.5114 24.8356 94.5907 23.7221 93.1761 23.7221C91.7615 23.7221 90.8408 24.8356 90.8408 26.7718C90.8408 28.7162 91.7615 29.8297 93.1761 29.8297Z" fill="white"></path><path d="M99.1589 22.4008H100.883V23.8883H100.925C101.218 22.8662 102.005 22.2596 103.043 22.2596C103.302 22.2596 103.528 22.3011 103.662 22.326V23.9963C103.52 23.9381 103.202 23.8966 102.85 23.8966C101.687 23.8966 100.967 24.6694 100.967 25.9075V31.1427H99.1589V22.4008Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M111.026 28.5812H112.742C112.491 30.1766 110.967 31.3151 108.95 31.3151C106.364 31.3151 104.798 29.5783 104.798 26.8195C104.798 24.0773 106.389 22.2492 108.875 22.2492C111.319 22.2492 112.842 23.961 112.842 26.6118V27.2267H106.623V27.3347C106.623 28.8554 107.544 29.8609 108.992 29.8609C110.021 29.8609 110.783 29.3457 111.026 28.5812ZM106.623 26.0752L111.026 26.0338C111.026 25.6655 110.871 24.9827 110.506 24.6207C110.141 24.2586 109.604 23.9837 108.875 23.9837C107.406 23.9837 106.623 24.9579 106.623 26.0752Z" fill="white"></path></svg></div><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M38.1173 11.1907H35.5787V11.9386H37.3793C37.2902 12.9874 36.4113 13.4347 35.5818 13.4347C34.5204 13.4347 33.5941 12.6056 33.5941 11.4435C33.5941 10.3115 34.477 9.4397 35.584 9.4397C36.4382 9.4397 36.9415 9.98015 36.9415 9.98015L37.4689 9.43788C37.4689 9.43788 36.7919 8.68964 35.5571 8.68964C33.9847 8.68964 32.7684 10.0071 32.7684 11.4301C32.7684 12.8246 33.9126 14.1841 35.5971 14.1841C37.0788 14.1841 38.1634 13.1766 38.1634 11.6866C38.1634 11.3723 38.1173 11.1907 38.1173 11.1907Z" fill="white"></path><path d="M38.5956 23.2445H44.1741C44.178 23.2602 44.275 23.6573 44.275 24.334C44.275 27.6082 41.8918 29.8224 38.6362 29.8224C34.9344 29.8224 32.4202 26.8347 32.4202 23.7706C32.4202 20.6437 35.0931 17.7486 38.5481 17.7487C41.2614 17.7487 42.7492 19.3929 42.7492 19.3929L41.59 20.5845C41.59 20.5845 40.4842 19.3967 38.6073 19.3967C36.1749 19.3967 34.2348 21.3124 34.2348 23.7999C34.2348 26.3533 36.27 28.1752 38.6023 28.1752C40.4252 28.1752 42.3565 27.1923 42.552 24.8879H38.5956V23.2445Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.9867 25.903C44.9867 23.8309 46.6271 22.0543 48.9162 22.0543C50.7978 22.0543 52.8382 23.378 52.8382 25.9482C52.8382 28.1906 51.0841 29.8153 48.9429 29.8153C46.5777 29.8153 44.9867 28.0057 44.9867 25.903ZM51.1313 25.9379C51.1313 24.482 50.0646 23.5785 48.9389 23.5785C47.6741 23.5785 46.702 24.5824 46.702 25.9266C46.702 27.3003 47.6862 28.2921 48.9337 28.2921C50.069 28.2921 51.1313 27.3628 51.1313 25.9379Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.555 22.0543C55.266 22.0543 53.6255 23.8309 53.6255 25.903C53.6255 28.0057 55.2166 29.8153 57.582 29.8153C59.723 29.8153 61.4772 28.1906 61.4772 25.9482C61.4772 23.378 59.4368 22.0543 57.555 22.0543ZM57.5778 23.5785C58.7034 23.5785 59.7702 24.482 59.7702 25.9379C59.7702 27.3628 58.7079 28.2921 57.5725 28.2921C56.3251 28.2921 55.341 27.3003 55.341 25.9266C55.341 24.5824 56.3129 23.5785 57.5778 23.5785Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.2641 25.9357C62.2641 23.8853 63.9158 22.0584 66.0167 22.0584C66.9315 22.0584 67.6205 22.4099 68.1244 22.949V22.2917H69.7632V29.2646C69.7632 32.0043 68.1711 33.3103 66.082 33.3103C64.1722 33.3103 63.0994 32.1446 62.5663 31.0252L64.0686 30.4018C64.2767 30.9018 64.8756 31.7836 66.0695 31.7836C67.3055 31.7836 68.1243 30.9815 68.1243 29.6427V28.8775C67.687 29.3813 67.0947 29.8205 65.9805 29.8205C64.1788 29.8205 62.2641 28.2715 62.2641 25.9357ZM66.1688 23.5796C67.199 23.5796 68.2568 24.4528 68.2568 25.944C68.2568 27.4598 67.2012 28.2951 66.1461 28.2951C65.0261 28.2951 63.9838 27.3922 63.9838 25.9584C63.9838 24.4686 65.0663 23.5796 66.1688 23.5796Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M73.7486 25.9245C73.7486 23.6146 75.4125 22.0491 77.3944 22.0491C78.9576 22.0491 80.1387 23.0841 80.645 24.3232L80.9172 24.9559L75.6759 27.1149C75.989 27.6935 76.4943 28.2909 77.593 28.291C78.5713 28.291 79.1575 27.763 79.5082 27.2227L80.8593 28.1153C80.2535 28.9201 79.2386 29.8183 77.5848 29.8183C75.6033 29.8183 73.7486 28.3687 73.7486 25.9245ZM77.4628 23.5416C78.177 23.5416 78.6909 23.9184 78.9092 24.3705L75.409 25.8228C75.2581 24.6984 76.3313 23.5416 77.4628 23.5416Z" fill="white"></path><path d="M72.7991 29.5879H71.0775V18.1501H72.7991V29.5879Z" fill="white"></path><path d="M94.1596 29.5879H95.8812V18.1501H94.1596V29.5879Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.7517 29.5879H85.0301V18.1501L89.1945 18.1499C91.2132 18.1499 92.8648 19.7896 92.8648 21.7937C92.8648 23.7977 91.2132 25.4373 89.1945 25.4373H86.7517V29.5879ZM86.7516 23.7282V19.8591H89.1945C90.263 19.8591 91.1433 20.7329 91.1433 21.7937C91.1433 22.8544 90.263 23.7282 89.1945 23.7282H86.7516Z" fill="white"></path><path d="M108.592 33.3103L113.577 22.0493H111.696L109.441 27.1452L107.185 22.0493H105.305L108.5 29.2692L106.712 33.3103H108.592Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.927 29.5879H104.649V25.4742C104.918 21.2314 99.4999 20.2336 97.4497 23.2921L98.8351 24.215C99.8375 22.4751 102.698 22.8755 102.886 24.7401C102.026 24.514 101.098 24.3501 100.249 24.4353C98.9247 24.5684 97.7907 25.4034 97.6105 26.7712C97.5131 27.5103 97.6793 28.4213 98.199 28.9765C99.0089 29.8415 100.339 29.9581 101.431 29.6625C102.046 29.4961 102.53 29.1333 102.927 28.6647V29.5879ZM101.022 28.1717C101.964 27.9169 102.707 27.2327 102.927 26.2816C102.445 26.1267 102.002 26.0017 101.494 25.9408C98.5359 25.4993 99.0312 28.7104 101.022 28.1717Z" fill="white"></path><path d="M49.2771 14.0775H48.4937V8.87231H49.2771V14.0775Z" fill="white"></path><path d="M44.1061 14.0775H44.8896V9.65006H46.1757V8.87231H42.82V9.65006H44.1061V14.0775Z" fill="white"></path><path d="M41.994 14.0775H38.9893V8.87231H41.994V9.65006H39.7729V11.0861H41.7266V11.8638H39.7729V13.2997H41.994V14.0775Z" fill="white"></path><path d="M51.9844 14.0775V9.65006H53.2705V8.87231H49.915V9.65006H51.201V14.0775H51.9844Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M55.2864 11.4301C55.2864 10.007 56.5028 8.68964 58.0751 8.68964C59.6475 8.68964 60.8639 10.007 60.8639 11.4301C60.8639 12.8134 59.7378 14.1623 58.0751 14.1836C56.4125 14.1623 55.2864 12.8134 55.2864 11.4301ZM58.0751 13.4343C57.0241 13.4215 56.1122 12.5966 56.1122 11.4435C56.1122 10.3207 56.9808 9.45397 58.0751 9.43995C59.1695 9.45397 60.0381 10.3207 60.0381 11.4435C60.0381 12.5966 59.1262 13.4215 58.0751 13.4343Z" fill="white"></path><path d="M62.43 14.0775H61.6464V8.87231H62.43L64.9449 12.6619V8.87231H65.7285V14.0775H64.9463L62.43 10.286V14.0775Z" fill="white"></path><path d="M11.3758 15.1822L20.2279 23.9572L11.4183 32.8091C11.1612 32.647 11.0234 32.2958 11.021 31.8421L10.9412 16.1313C10.9387 15.6345 11.1208 15.3315 11.3758 15.1822Z" fill="white"></path><path d="M12.3827 15.1941L23.147 21.0242L20.5941 23.5892L12.0071 15.0769C12.1372 15.0938 12.2678 15.1317 12.3827 15.1941Z" fill="white"></path><path d="M23.6257 26.5943L20.9628 23.9546L23.623 21.282L27.2863 23.2659C28.1887 23.7544 27.7271 24.3656 27.2863 24.6051L23.6257 26.5943Z" fill="white"></path><path d="M12.3827 32.7031C12.3014 32.7482 12.223 32.7835 12.148 32.8116L20.5967 24.3227L23.1492 26.853L12.3827 32.7031Z" fill="white"></path></svg></div></div><div class="col-span-1"><div class="my-2 text-secondary-orange font-semibold">Contactanos</div><a href="https://www.google.com/maps/place/GLIK+7/@10.4940965,-66.8547532,17z/data=!3m1!4b1!4m6!3m5!1s0x8c2af70856c1a779:0x77aa75f245771c40!8m2!3d10.4940965!4d-66.8547532!16s%2Fg%2F11svrs7m27?entry=ttu"><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"></path><path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg></span>Casa 1722 C. Sucre, Caracas 1060, Miranda.</p></a><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"></path></svg></span> ventas@glik7.com</p><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"></path></svg></span>04128229919</p></div><div class="col-span-1"><div class="my-2 ml-2 text-secondary-orange font-semibold">Extra</div><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Nosotros</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Cómo funciona</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Terminos y condiciones</p></div><div class="col-span-1 mt-4"><div class="space-y-3"><a href="https://www.instagram.com/glik.ve/"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="white"></path></g></svg></div></a><a href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></div></a><a href="https://www.tiktok.com/@glik7"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></div></a></div></div></div></footer></div><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/config/Providers.config.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"Providers\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/navbar.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:st"])</script><script>self.__next_f.push([1,"atic/chunks/app/(dashboard)/layout.js\"],\"name\":\"Navbar\",\"async\":false}\na:I{\"id\":\"(app-client)/./src/socialNetworksButton.component.tsx\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"\",\"async\":false}\nb:I{\"id\":\"(app-client)/./node_modules/next/dist/client/image-component.js\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"Image\",\"async\":false}\nc:I{\"id\":\"(app-client)/./src/components/Product/productsList.component.tsx\",\"chunks\":[\"app/(dashboard)"])</script><script>self.__next_f.push([1,"/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"ProductsList\",\"async\":false}\nd:I{\"id\":\"(app-client)/./src/components/Footer/footer.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"(dashboard)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-offwhite __className_e66fe9\",\"children\":[\"$\",\"$L8\",null,{\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"className\":\"grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48\",\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(dashboard)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"main\",null,{\"className\":\"space-y-7\",\"children\":[[\"$\",\"div\",null,{\"className\":\"fixed bottom-5 right-5\",\"children\":[\" \",[\"$\",\"$La\",null,{}]]}],[\"$\",\"figure\",null,{\"children\":[\"$\",\"$Lb\",null,{\"src\":{\"src\":\"/_next/static/media/glik_banner.126325ef.webp\",\"height\":509,\"width\":1532,\"blurDataURL\":\"/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fglik_banner.126325ef.webp\u0026w=8\u0026q=70\",\"blurWidth\":8,\"blurHeight\":3},\"alt\":\"Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS\",\"width\":1920,\"height\":1080,\"className\":\"mx-auto mt-5\"}]}],[\"$\",\"h3\",null,{\"className\":\"text-lg font-bold 2xl:text-3xl text-center 2xl:text-left\",\"children\":\"Modelos disponibles\"}],[\"$\",\"$Lc\",null,{}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}]}],[\"$\",\"$Ld\",null,{}]]}]}]}],null],\"segment\":\"(dashboard)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",\"precedence\":\"next_static/css/app/(dashboard)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Página de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Solution Asegúrese de que su servidor web, servidor de aplicaciones, balanceador de carga, etc. esté configurado para establecer la cabecera Content-Security-Policy.
-
-
-
Risk=Medio, Confidence=Media (1)
-
http://localhost:3000 (1)
-
Falta de cabecera Anti-Clickjacking (1)
GET http://localhost:3000/
Alert tags Alert description La respuesta no incluye Content-Security-Policy con la directiva 'frame-ancestors' ni X-Frame-Options para proteger contra ataques de 'ClickJacking'.
Request Request line and header section (229 bytes)
GET http://localhost:3000/ HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:57:51 GMT connection: close content-length: 56229
Response body (56229 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(dashboard)/layout.css?v=1701471471153" data-precedence="next_static/css/app/(dashboard)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik</title><meta name="description" content="Página de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-offwhite __className_e66fe9"><div><div class="2xl:hidden"><nav class="bg-navbar-color p-5 space-y-5"><div class="grid grid-cols-2"><section class="flex space-x-2 items-center"><figure class="max-w-[80px]"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure></section><section class="flex justify-end pr-2 items-center"><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg></a></section></div><section><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></section></nav></div><div class="hidden 2xl:block"><nav class="bg-navbar-color"><div class="grid grid-cols-4 2xl:grid-cols-5 justify-items-stretch gap-4 2xl:gap-4 border-b border-b-gray-border 2xl:px-6 px-4 py-4 2xl:items-center"><figure class="flex col-span-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="2xl:hidden"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#1C1C1C"></path></svg><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure><div class="col-span-1"></div><div class="col-span-2 flex items-center "><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></div><div class="col-span-1"><ul class="flex justify-end text-center align-middle text-white text-sm"><li><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg><p>Iniciar Sesión</p></a></li></ul></div></div></nav></div></div><main class="grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48"><section class="col-span-4 2xl:col-span-8"><main class="space-y-7"><div class="fixed bottom-5 right-5"> <div class="fixed bottom-5 right-5 md:right-5 z-50 space-y-4 md:space-y-0 md:flex md:flex-col p-2"><a target="_blank" rel="noopener noreferrer" href="https://www.instagram.com/glik.ve/"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="#000000"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://www.tiktok.com/@glik7"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></a></div></div><figure><img alt="Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS" loading="lazy" width="1920" height="1080" decoding="async" data-nimg="1" class="mx-auto mt-5" style="color:transparent" src="/_next/static/media/glik_banner.126325ef.webp"/></figure><h3 class="text-lg font-bold 2xl:text-3xl text-center 2xl:text-left">Modelos disponibles</h3><div class="space-y-3 2xl:space-y-0 2xl:grid 2xl:grid-cols-8 2xl:gap-4 2xl:justify-items-stretch pb-8"></div></main></section></main><div class="mx-auto max-md:hidden mt-2"><footer class="bg-navbar-color py-1 text-black lg:px-48"><div class="flex align-middle mt-4"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras blancas y foto de un conejo" loading="lazy" width="201" height="70" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></div><hr class="my-8 h-0.5 border-t-0 bg-neutral-100 opacity-50 dark:opacity-50"/><div class="px-4 max-w-full mt-8 md:grid md:grid-cols-4 gap-4 2xl:grid 2xl:grid-cols-4 justify-items-center align-middle"> <div class="col-span-1"><p class="my-2 text-white font-bold">$ USD</p><p class="my-2 text-white">Copyright Glik.ve</p><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M24.9292 8.68964C25.0796 10.0467 24.5379 11.3839 23.7462 12.3668C22.9201 13.3345 21.5985 14.0746 20.3113 13.9793C20.1428 12.6735 20.795 11.285 21.5251 10.4379C22.3503 9.47652 23.7834 8.74 24.9292 8.68964Z" fill="white"></path><path d="M29.1431 16.5179C28.9994 16.603 26.6188 18.0136 26.6449 20.8903C26.6757 24.3643 29.7066 25.5127 29.7429 25.5244C29.7248 25.6053 29.2682 27.1836 28.1314 28.7825C27.1821 30.1926 26.1875 31.5712 24.6077 31.5946C23.8564 31.6122 23.3491 31.3979 22.8205 31.1745C22.2694 30.9416 21.6951 30.6989 20.7968 30.6989C19.8445 30.6989 19.2447 30.9496 18.6663 31.1914C18.1659 31.4005 17.6814 31.603 16.9986 31.6306C15.494 31.6854 14.3445 30.1269 13.3607 28.7294C11.3942 25.8778 9.8633 20.6934 11.9159 17.1655C12.9105 15.4352 14.724 14.321 16.6625 14.2913C17.5162 14.274 18.3349 14.6006 19.0526 14.8869C19.6015 15.1058 20.0913 15.3012 20.4924 15.3012C20.8448 15.3012 21.3208 15.1137 21.8757 14.895C22.7501 14.5505 23.8201 14.1289 24.9102 14.2428C25.6557 14.2643 27.7772 14.535 29.1459 16.5162L29.1431 16.5179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M40.0404 9.46415H37.9139V15.7451H40.0404C41.9213 15.7451 43.0261 14.5829 43.0261 12.6025C43.0261 10.6263 41.9169 9.46415 40.0404 9.46415ZM38.7031 10.1693V15.04H39.9877C41.4215 15.04 42.2194 14.1694 42.2194 12.6112C42.2194 11.0398 41.4258 10.1693 39.9877 10.1693H38.7031Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M46.0745 15.8235C44.8118 15.8235 43.9612 14.9225 43.9612 13.4817C43.9612 12.0366 44.8118 11.1399 46.0745 11.1399C47.3328 11.1399 48.1834 12.0366 48.1834 13.4817C48.1834 14.9225 47.3328 15.8235 46.0745 15.8235ZM47.4074 13.4817C47.4074 14.5481 46.8812 15.1575 46.0745 15.1575C45.2678 15.1575 44.7372 14.5481 44.7372 13.4817C44.7372 12.4153 45.2678 11.8059 46.0745 11.8059C46.8812 11.8059 47.4074 12.4153 47.4074 13.4817Z" fill="white"></path><path d="M53.003 15.7451H53.7791L55.0506 11.2183H54.2964L53.3845 14.9007H53.367L52.3322 11.2183H51.5956L50.5653 14.9007H50.5478L49.6358 11.2183H48.8773L50.1532 15.7451H50.9292L51.9552 12.2412H51.9727L53.003 15.7451Z" fill="white"></path><path d="M56.6915 11.2183H55.9725V15.7451H56.7354V13.0813C56.7354 12.3152 57.2045 11.8103 57.9235 11.8103C58.625 11.8103 58.9714 12.2107 58.9714 12.942V15.7451H59.7343V12.807C59.7343 11.7798 59.1556 11.1399 58.1559 11.1399C57.45 11.1399 56.9633 11.4533 56.7091 11.9408H56.6915V11.2183Z" fill="white"></path><path d="M61.042 9.46415V15.7451H61.8049V9.46415H61.042Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.911 13.4817C62.911 14.9225 63.7615 15.8235 65.0243 15.8235C66.2826 15.8235 67.1332 14.9225 67.1332 13.4817C67.1332 12.0366 66.2826 11.1399 65.0243 11.1399C63.7615 11.1399 62.911 12.0366 62.911 13.4817ZM65.0242 15.1575C65.831 15.1575 66.3571 14.5481 66.3571 13.4817C66.3571 12.4153 65.831 11.8059 65.0242 11.8059C64.2175 11.8059 63.687 12.4153 63.687 13.4817C63.687 14.5481 64.2175 15.1575 65.0242 15.1575Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.5326 15.8235C68.625 15.8235 68.0156 15.2794 68.0156 14.4654C68.0156 13.6906 68.6163 13.2031 69.6685 13.1422L70.9751 13.0682V12.6895C70.9751 12.1367 70.6068 11.8059 69.9754 11.8059C69.3879 11.8059 69.0196 12.0801 68.9232 12.5241H68.1866C68.2392 11.7406 68.9144 11.1399 69.993 11.1399C71.0628 11.1399 71.738 11.7145 71.738 12.6155V15.7451H71.0145V14.966H70.997C70.7252 15.484 70.1464 15.8235 69.5326 15.8235ZM70.9751 14.0258C70.9751 14.6787 70.4226 15.1793 69.7036 15.1793C69.1555 15.1793 68.7916 14.8963 68.7916 14.4654C68.7916 14.0389 69.1424 13.769 69.7562 13.7298L70.9751 13.6558V14.0258Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M72.7826 13.4817C72.7826 14.9007 73.5718 15.8235 74.7337 15.8235C75.3914 15.8235 75.9131 15.5014 76.2069 14.979H76.22V15.7451H76.9478V9.46415H76.1849V11.9539H76.1674C75.8956 11.4577 75.3694 11.1399 74.7162 11.1399C73.5674 11.1399 72.7826 12.0627 72.7826 13.4817ZM74.8784 11.8059C74.0717 11.8059 73.5631 12.4588 73.5631 13.4817C73.5631 14.509 74.0717 15.1575 74.8784 15.1575C75.6632 15.1575 76.1893 14.4959 76.1893 13.4817C76.1893 12.4719 75.6632 11.8059 74.8784 11.8059Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M82.3079 15.8235C81.0452 15.8235 80.1946 14.9225 80.1946 13.4817C80.1946 12.0366 81.0452 11.1399 82.3079 11.1399C83.5663 11.1399 84.4168 12.0366 84.4168 13.4817C84.4168 14.9225 83.5663 15.8235 82.3079 15.8235ZM83.6408 13.4817C83.6408 14.5481 83.1147 15.1575 82.3079 15.1575C81.5012 15.1575 80.9707 14.5481 80.9707 13.4817C80.9707 12.4153 81.5012 11.8059 82.3079 11.8059C83.1147 11.8059 83.6408 12.4153 83.6408 13.4817Z" fill="white"></path><path d="M86.2025 11.2183H85.4834V15.7451H86.2463V13.0813C86.2463 12.3152 86.7154 11.8103 87.4345 11.8103C88.136 11.8103 88.4824 12.2107 88.4824 12.942V15.7451H89.2453V12.807C89.2453 11.7798 88.6665 11.1399 87.6669 11.1399C86.961 11.1399 86.4743 11.4533 86.22 11.9408H86.2025V11.2183Z" fill="white"></path><path d="M93.6627 10.1258H92.8998V11.2183H92.2202V11.8407H92.8998V14.5699C92.8998 15.4404 93.2243 15.7799 94.0617 15.7799C94.2414 15.7799 94.4519 15.7669 94.544 15.7451V15.1096C94.4914 15.1183 94.316 15.1314 94.2283 15.1314C93.8381 15.1314 93.6627 14.9442 93.6627 14.5307V11.8407H94.5484V11.2183H93.6627V10.1258Z" fill="white"></path><path d="M95.6982 9.46415V15.7451H96.4611V13.1074C96.4611 12.3239 96.9303 11.8103 97.6888 11.8103C98.4034 11.8103 98.7673 12.2412 98.7673 12.9594V15.7451H99.5302V12.8201C99.5302 11.8103 98.9252 11.1399 97.9255 11.1399C97.2328 11.1399 96.733 11.4359 96.4787 11.9408H96.4611V9.46415H95.6982Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M104.573 14.448H103.824C103.697 14.8746 103.271 15.1662 102.693 15.1662C101.873 15.1662 101.36 14.596 101.36 13.7298V13.6863H104.63V13.399C104.63 12.0279 103.872 11.1399 102.64 11.1399C101.382 11.1399 100.575 12.0932 100.575 13.4991C100.575 14.9225 101.368 15.8235 102.675 15.8235C103.67 15.8235 104.442 15.2402 104.573 14.448ZM102.627 11.7972C101.912 11.7972 101.412 12.3413 101.364 13.0943H103.841C103.824 12.3369 103.346 11.7972 102.627 11.7972Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M45.3018 31.1427L44.197 27.9019H39.5933L38.4884 31.1427H36.5382L40.8991 19.1517H42.9247L47.2856 31.1427H45.3018ZM40.0704 26.4061L41.87 21.1461H41.9202L43.7198 26.4061H40.0704Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.1019 26.7718C57.1019 24.0046 55.6287 22.2596 53.3939 22.2596C52.1216 22.2596 51.1088 22.8994 50.5898 23.9049H50.5564V22.4008H48.807V34.0345H50.6149V29.7051H50.6568C51.159 30.6773 52.1634 31.2922 53.4274 31.2922C55.6371 31.2922 57.1019 29.5389 57.1019 26.7718ZM52.9168 29.7716C54.3481 29.7716 55.2437 28.6082 55.2437 26.7718C55.2437 24.9436 54.3481 23.7719 52.9168 23.7719C51.5357 23.7719 50.6066 24.9685 50.6066 26.7718C50.6066 28.5916 51.5273 29.7716 52.9168 29.7716Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.4864 22.2596C65.7213 22.2596 67.1944 24.0046 67.1944 26.7718C67.1944 29.5389 65.7296 31.2922 63.5199 31.2922C62.256 31.2922 61.2515 30.6773 60.7493 29.7051H60.7075V34.0345H58.8995V22.4008H60.6489V23.9049H60.6824C61.2013 22.8994 62.2141 22.2596 63.4864 22.2596ZM65.3362 26.7718C65.3362 28.6082 64.4406 29.7716 63.0093 29.7716C61.6198 29.7716 60.6991 28.5916 60.6991 26.7718C60.6991 24.9685 61.6282 23.7719 63.0093 23.7719C64.4406 23.7719 65.3362 24.9436 65.3362 26.7718Z" fill="white"></path><path d="M74.4056 27.8022H72.5558C72.673 29.971 74.4809 31.3421 77.1594 31.3421C80.0221 31.3421 81.8217 29.9378 81.8217 27.6941C81.8217 25.9408 80.7921 24.9519 78.3145 24.3702L76.9837 24.0462C75.4268 23.6639 74.7906 23.1653 74.7906 22.3177C74.7906 21.2541 75.7867 20.5228 77.2431 20.5228C78.6996 20.5228 79.6956 21.2458 79.8044 22.4424H81.6291C81.5705 20.3733 79.8212 18.9523 77.2682 18.9523C74.6902 18.9523 72.8739 20.3733 72.8739 22.4424C72.8739 24.1126 73.9034 25.143 76.1215 25.6749L77.6868 26.0488C79.252 26.4311 79.9132 26.9878 79.9132 27.9185C79.9132 28.9905 78.8167 29.7716 77.2934 29.7716C75.703 29.7716 74.5395 28.9905 74.4056 27.8022Z" fill="white"></path><path d="M86.0383 20.3317H84.2219V22.4008H82.9413V23.8218H84.2219V28.8409C84.2219 30.5278 84.9167 31.2008 86.6995 31.2008C87.1013 31.2008 87.5031 31.1676 87.704 31.1177V29.6968C87.5868 29.7217 87.2938 29.7383 87.1097 29.7383C86.3731 29.7383 86.0383 29.3976 86.0383 28.6414V23.8218H87.7123V22.4008H86.0383V20.3317Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M88.9994 26.7718C88.9994 29.5888 90.6567 31.3089 93.1761 31.3089C95.6956 31.3089 97.3529 29.5888 97.3529 26.7718C97.3529 23.9631 95.6872 22.2429 93.1761 22.2429C90.665 22.2429 88.9994 23.9631 88.9994 26.7718ZM93.1761 29.8297C94.5991 29.8297 95.5114 28.7162 95.5114 26.7718C95.5114 24.8356 94.5907 23.7221 93.1761 23.7221C91.7615 23.7221 90.8408 24.8356 90.8408 26.7718C90.8408 28.7162 91.7615 29.8297 93.1761 29.8297Z" fill="white"></path><path d="M99.1589 22.4008H100.883V23.8883H100.925C101.218 22.8662 102.005 22.2596 103.043 22.2596C103.302 22.2596 103.528 22.3011 103.662 22.326V23.9963C103.52 23.9381 103.202 23.8966 102.85 23.8966C101.687 23.8966 100.967 24.6694 100.967 25.9075V31.1427H99.1589V22.4008Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M111.026 28.5812H112.742C112.491 30.1766 110.967 31.3151 108.95 31.3151C106.364 31.3151 104.798 29.5783 104.798 26.8195C104.798 24.0773 106.389 22.2492 108.875 22.2492C111.319 22.2492 112.842 23.961 112.842 26.6118V27.2267H106.623V27.3347C106.623 28.8554 107.544 29.8609 108.992 29.8609C110.021 29.8609 110.783 29.3457 111.026 28.5812ZM106.623 26.0752L111.026 26.0338C111.026 25.6655 110.871 24.9827 110.506 24.6207C110.141 24.2586 109.604 23.9837 108.875 23.9837C107.406 23.9837 106.623 24.9579 106.623 26.0752Z" fill="white"></path></svg></div><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M38.1173 11.1907H35.5787V11.9386H37.3793C37.2902 12.9874 36.4113 13.4347 35.5818 13.4347C34.5204 13.4347 33.5941 12.6056 33.5941 11.4435C33.5941 10.3115 34.477 9.4397 35.584 9.4397C36.4382 9.4397 36.9415 9.98015 36.9415 9.98015L37.4689 9.43788C37.4689 9.43788 36.7919 8.68964 35.5571 8.68964C33.9847 8.68964 32.7684 10.0071 32.7684 11.4301C32.7684 12.8246 33.9126 14.1841 35.5971 14.1841C37.0788 14.1841 38.1634 13.1766 38.1634 11.6866C38.1634 11.3723 38.1173 11.1907 38.1173 11.1907Z" fill="white"></path><path d="M38.5956 23.2445H44.1741C44.178 23.2602 44.275 23.6573 44.275 24.334C44.275 27.6082 41.8918 29.8224 38.6362 29.8224C34.9344 29.8224 32.4202 26.8347 32.4202 23.7706C32.4202 20.6437 35.0931 17.7486 38.5481 17.7487C41.2614 17.7487 42.7492 19.3929 42.7492 19.3929L41.59 20.5845C41.59 20.5845 40.4842 19.3967 38.6073 19.3967C36.1749 19.3967 34.2348 21.3124 34.2348 23.7999C34.2348 26.3533 36.27 28.1752 38.6023 28.1752C40.4252 28.1752 42.3565 27.1923 42.552 24.8879H38.5956V23.2445Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.9867 25.903C44.9867 23.8309 46.6271 22.0543 48.9162 22.0543C50.7978 22.0543 52.8382 23.378 52.8382 25.9482C52.8382 28.1906 51.0841 29.8153 48.9429 29.8153C46.5777 29.8153 44.9867 28.0057 44.9867 25.903ZM51.1313 25.9379C51.1313 24.482 50.0646 23.5785 48.9389 23.5785C47.6741 23.5785 46.702 24.5824 46.702 25.9266C46.702 27.3003 47.6862 28.2921 48.9337 28.2921C50.069 28.2921 51.1313 27.3628 51.1313 25.9379Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.555 22.0543C55.266 22.0543 53.6255 23.8309 53.6255 25.903C53.6255 28.0057 55.2166 29.8153 57.582 29.8153C59.723 29.8153 61.4772 28.1906 61.4772 25.9482C61.4772 23.378 59.4368 22.0543 57.555 22.0543ZM57.5778 23.5785C58.7034 23.5785 59.7702 24.482 59.7702 25.9379C59.7702 27.3628 58.7079 28.2921 57.5725 28.2921C56.3251 28.2921 55.341 27.3003 55.341 25.9266C55.341 24.5824 56.3129 23.5785 57.5778 23.5785Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.2641 25.9357C62.2641 23.8853 63.9158 22.0584 66.0167 22.0584C66.9315 22.0584 67.6205 22.4099 68.1244 22.949V22.2917H69.7632V29.2646C69.7632 32.0043 68.1711 33.3103 66.082 33.3103C64.1722 33.3103 63.0994 32.1446 62.5663 31.0252L64.0686 30.4018C64.2767 30.9018 64.8756 31.7836 66.0695 31.7836C67.3055 31.7836 68.1243 30.9815 68.1243 29.6427V28.8775C67.687 29.3813 67.0947 29.8205 65.9805 29.8205C64.1788 29.8205 62.2641 28.2715 62.2641 25.9357ZM66.1688 23.5796C67.199 23.5796 68.2568 24.4528 68.2568 25.944C68.2568 27.4598 67.2012 28.2951 66.1461 28.2951C65.0261 28.2951 63.9838 27.3922 63.9838 25.9584C63.9838 24.4686 65.0663 23.5796 66.1688 23.5796Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M73.7486 25.9245C73.7486 23.6146 75.4125 22.0491 77.3944 22.0491C78.9576 22.0491 80.1387 23.0841 80.645 24.3232L80.9172 24.9559L75.6759 27.1149C75.989 27.6935 76.4943 28.2909 77.593 28.291C78.5713 28.291 79.1575 27.763 79.5082 27.2227L80.8593 28.1153C80.2535 28.9201 79.2386 29.8183 77.5848 29.8183C75.6033 29.8183 73.7486 28.3687 73.7486 25.9245ZM77.4628 23.5416C78.177 23.5416 78.6909 23.9184 78.9092 24.3705L75.409 25.8228C75.2581 24.6984 76.3313 23.5416 77.4628 23.5416Z" fill="white"></path><path d="M72.7991 29.5879H71.0775V18.1501H72.7991V29.5879Z" fill="white"></path><path d="M94.1596 29.5879H95.8812V18.1501H94.1596V29.5879Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.7517 29.5879H85.0301V18.1501L89.1945 18.1499C91.2132 18.1499 92.8648 19.7896 92.8648 21.7937C92.8648 23.7977 91.2132 25.4373 89.1945 25.4373H86.7517V29.5879ZM86.7516 23.7282V19.8591H89.1945C90.263 19.8591 91.1433 20.7329 91.1433 21.7937C91.1433 22.8544 90.263 23.7282 89.1945 23.7282H86.7516Z" fill="white"></path><path d="M108.592 33.3103L113.577 22.0493H111.696L109.441 27.1452L107.185 22.0493H105.305L108.5 29.2692L106.712 33.3103H108.592Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.927 29.5879H104.649V25.4742C104.918 21.2314 99.4999 20.2336 97.4497 23.2921L98.8351 24.215C99.8375 22.4751 102.698 22.8755 102.886 24.7401C102.026 24.514 101.098 24.3501 100.249 24.4353C98.9247 24.5684 97.7907 25.4034 97.6105 26.7712C97.5131 27.5103 97.6793 28.4213 98.199 28.9765C99.0089 29.8415 100.339 29.9581 101.431 29.6625C102.046 29.4961 102.53 29.1333 102.927 28.6647V29.5879ZM101.022 28.1717C101.964 27.9169 102.707 27.2327 102.927 26.2816C102.445 26.1267 102.002 26.0017 101.494 25.9408C98.5359 25.4993 99.0312 28.7104 101.022 28.1717Z" fill="white"></path><path d="M49.2771 14.0775H48.4937V8.87231H49.2771V14.0775Z" fill="white"></path><path d="M44.1061 14.0775H44.8896V9.65006H46.1757V8.87231H42.82V9.65006H44.1061V14.0775Z" fill="white"></path><path d="M41.994 14.0775H38.9893V8.87231H41.994V9.65006H39.7729V11.0861H41.7266V11.8638H39.7729V13.2997H41.994V14.0775Z" fill="white"></path><path d="M51.9844 14.0775V9.65006H53.2705V8.87231H49.915V9.65006H51.201V14.0775H51.9844Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M55.2864 11.4301C55.2864 10.007 56.5028 8.68964 58.0751 8.68964C59.6475 8.68964 60.8639 10.007 60.8639 11.4301C60.8639 12.8134 59.7378 14.1623 58.0751 14.1836C56.4125 14.1623 55.2864 12.8134 55.2864 11.4301ZM58.0751 13.4343C57.0241 13.4215 56.1122 12.5966 56.1122 11.4435C56.1122 10.3207 56.9808 9.45397 58.0751 9.43995C59.1695 9.45397 60.0381 10.3207 60.0381 11.4435C60.0381 12.5966 59.1262 13.4215 58.0751 13.4343Z" fill="white"></path><path d="M62.43 14.0775H61.6464V8.87231H62.43L64.9449 12.6619V8.87231H65.7285V14.0775H64.9463L62.43 10.286V14.0775Z" fill="white"></path><path d="M11.3758 15.1822L20.2279 23.9572L11.4183 32.8091C11.1612 32.647 11.0234 32.2958 11.021 31.8421L10.9412 16.1313C10.9387 15.6345 11.1208 15.3315 11.3758 15.1822Z" fill="white"></path><path d="M12.3827 15.1941L23.147 21.0242L20.5941 23.5892L12.0071 15.0769C12.1372 15.0938 12.2678 15.1317 12.3827 15.1941Z" fill="white"></path><path d="M23.6257 26.5943L20.9628 23.9546L23.623 21.282L27.2863 23.2659C28.1887 23.7544 27.7271 24.3656 27.2863 24.6051L23.6257 26.5943Z" fill="white"></path><path d="M12.3827 32.7031C12.3014 32.7482 12.223 32.7835 12.148 32.8116L20.5967 24.3227L23.1492 26.853L12.3827 32.7031Z" fill="white"></path></svg></div></div><div class="col-span-1"><div class="my-2 text-secondary-orange font-semibold">Contactanos</div><a href="https://www.google.com/maps/place/GLIK+7/@10.4940965,-66.8547532,17z/data=!3m1!4b1!4m6!3m5!1s0x8c2af70856c1a779:0x77aa75f245771c40!8m2!3d10.4940965!4d-66.8547532!16s%2Fg%2F11svrs7m27?entry=ttu"><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"></path><path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg></span>Casa 1722 C. Sucre, Caracas 1060, Miranda.</p></a><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"></path></svg></span> ventas@glik7.com</p><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"></path></svg></span>04128229919</p></div><div class="col-span-1"><div class="my-2 ml-2 text-secondary-orange font-semibold">Extra</div><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Nosotros</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Cómo funciona</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Terminos y condiciones</p></div><div class="col-span-1 mt-4"><div class="space-y-3"><a href="https://www.instagram.com/glik.ve/"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="white"></path></g></svg></div></a><a href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></div></a><a href="https://www.tiktok.com/@glik7"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></div></a></div></div></div></footer></div><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471153\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/config/Providers.config.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"Providers\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/navbar.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:st"])</script><script>self.__next_f.push([1,"atic/chunks/app/(dashboard)/layout.js\"],\"name\":\"Navbar\",\"async\":false}\na:I{\"id\":\"(app-client)/./src/socialNetworksButton.component.tsx\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"\",\"async\":false}\nb:I{\"id\":\"(app-client)/./node_modules/next/dist/client/image-component.js\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"Image\",\"async\":false}\nc:I{\"id\":\"(app-client)/./src/components/Product/productsList.component.tsx\",\"chunks\":[\"app/(dashboard)"])</script><script>self.__next_f.push([1,"/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"ProductsList\",\"async\":false}\nd:I{\"id\":\"(app-client)/./src/components/Footer/footer.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"(dashboard)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-offwhite __className_e66fe9\",\"children\":[\"$\",\"$L8\",null,{\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"className\":\"grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48\",\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(dashboard)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"main\",null,{\"className\":\"space-y-7\",\"children\":[[\"$\",\"div\",null,{\"className\":\"fixed bottom-5 right-5\",\"children\":[\" \",[\"$\",\"$La\",null,{}]]}],[\"$\",\"figure\",null,{\"children\":[\"$\",\"$Lb\",null,{\"src\":{\"src\":\"/_next/static/media/glik_banner.126325ef.webp\",\"height\":509,\"width\":1532,\"blurDataURL\":\"/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fglik_banner.126325ef.webp\u0026w=8\u0026q=70\",\"blurWidth\":8,\"blurHeight\":3},\"alt\":\"Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS\",\"width\":1920,\"height\":1080,\"className\":\"mx-auto mt-5\"}]}],[\"$\",\"h3\",null,{\"className\":\"text-lg font-bold 2xl:text-3xl text-center 2xl:text-left\",\"children\":\"Modelos disponibles\"}],[\"$\",\"$Lc\",null,{}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}]}],[\"$\",\"$Ld\",null,{}]]}]}]}],null],\"segment\":\"(dashboard)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471153\",\"precedence\":\"next_static/css/app/(dashboard)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Página de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Parameter x-frame-options
Solution Los navegadores web modernos admiten los encabezados HTTP Content-Security-Policy y X-Frame-Options. Asegúrese de que uno de ellos esté configurado en todas las páginas web devueltas por su sitio/aplicación.
Si espera que la página esté enmarcada solo por páginas en su servidor (por ejemplo, es parte de un FRAMESET), querrá usar SAMEORIGIN; de lo contrario, si nunca espera que la página esté enmarcada, debe usar DENY. Alternativamente, considere implementar la directiva "frame-ancestros" de la política de seguridad de contenido.
-
-
-
Risk=Medio, Confidence=Baja (1)
-
http://localhost:3000 (1)
-
Ausencia de Ttokens Anti-CSRF (1)
GET http://localhost:3000/register
Alert tags Alert description No se encontraron tokens Anti-CSRF en un formulario de envío HTML.
Una solicutud falsa entre sitios en un ataque que compromete y obliga a una víctima a enviar su solicitud HTTP a un destino objetivo sin su conocimiento o intención para poder realizar una acción como víctima. La causa oculta es la funcionalidad de la aplicación utilizando acciones de URL/formulario que pueden ser adivinados de forma repetible. La naturaleza del ataque es que CSRG explota la confianza que un sitio web proporciona a un usuario. Por el contrario, las cadenas de comandos de los sitios cruzados (XSS) explotan la confianza que un usuario proporciona en un sitio web. Al igual que XSS, los ataques CSRG no son de forma necesaria de sitios cruzados, pero hay la posibilidad de que si pueden serlo. La falsificación de las solicitudes ente los sitios también se conoce como CSRF, XSRG, ataques con un solo clic, montaje de sesión, diputado confundido y navegación en alta mar.
Los ataques de CSRG son muy efectivos en varias situaciones, que incluyen:
*La victima tiene una sesión activa en el sitio de destino.
*La víctima se autoriza por medio de la autenticación HTTP en el sitio de destino.
*La víctima se encuentra en la misma red local que el sitio de destino.
CSRF se ha utilizado especialmente para poder realizar una acción contra un sitio objetivo utilizando los privilegios de la víctima, pero se han revelado técnicas recientes para difundir información al obtener el acceso a la respuesta. El riesgo de divulgación de información aumenta de forma drástica cuando el sitio de destino se encuentra vulnerable a XSS, porque XSS se puede utilizar como una plataforma para CSRF, lo que le permite al atacante que opere desde adentro de los líites de la misma política de origen.
Other info Ninguna ficha (token) Anti-CSRF [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] fue encontrada en los siguientes formularios HTML: [Form 1: "acceptTermsAndConditions" "dni" "email" "emailMarketing" "password" "username" ].
Request Request line and header section (275 bytes)
GET http://localhost:3000/register HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache referer: http://localhost:3000/login
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:58:07 GMT connection: close content-length: 12815
Response body (12815 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(auth)/layout.css?v=1701471487028" data-precedence="next_static/css/app/(auth)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik - Autenticación</title><meta name="description" content="Servicio de autenticación de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-navbar-color __className_e66fe9"><main><section class="col-span-4 2xl:col-span-8"><section class="grid grid-cols-4 justify-items-center mx-4 gap-4 2xl:grid-cols-8 2xl:gap-4 2xl:mx-48"><div class="2xl:col-span-2"></div><main class="col-span-4"><div class="py-6 text-center space-y-5"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a><section class="space-y-5"><h1 class="font-bold text-2xl 2xl:text-3xl text-white">Regístrate</h1><h3 class="2xl:text-xl 2xl:font-medium text-white">Crear una nueva cuenta</h3></section><section><form><section class="space-y-5"><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="26" viewBox="0 0 25 26" fill="none" class="self-center"><g clip-path="url(#clip0_232_316)"><path d="M12.5 14.5625C16.3818 14.5625 19.5312 11.4131 19.5312 7.53125C19.5312 3.64941 16.3818 0.5 12.5 0.5C8.61816 0.5 5.46875 3.64941 5.46875 7.53125C5.46875 11.4131 8.61816 14.5625 12.5 14.5625ZM18.75 16.125H16.0596C14.9756 16.623 13.7695 16.9062 12.5 16.9062C11.2305 16.9062 10.0293 16.623 8.94043 16.125H6.25C2.79785 16.125 0 18.9229 0 22.375V23.1562C0 24.4502 1.0498 25.5 2.34375 25.5H22.6562C23.9502 25.5 25 24.4502 25 23.1562V22.375C25 18.9229 22.2021 16.125 18.75 16.125Z" fill="#4C3F92"></path></g><defs><clipPath id="clip0_232_316"><rect width="25" height="25" fill="white" transform="translate(0 0.5)"></rect></clipPath></defs></svg><input type="text" placeholder="Nombre de usuario" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="username"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><input type="text" placeholder="Cédula de identidad" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="dni"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="20" viewBox="0 0 25 20" fill="none" class="self-center"><path d="M24.5264 6.81641C24.7168 6.66504 25 6.80664 25 7.0459V17.0312C25 18.3252 23.9502 19.375 22.6562 19.375H2.34375C1.0498 19.375 0 18.3252 0 17.0312V7.05078C0 6.80664 0.27832 6.66992 0.473633 6.82129C1.56738 7.6709 3.01758 8.75 7.99805 12.3682C9.02832 13.1201 10.7666 14.7021 12.5 14.6924C14.2432 14.707 16.0156 13.0908 17.0068 12.3682C21.9873 8.75 23.4326 7.66602 24.5264 6.81641ZM12.5 13.125C13.6328 13.1445 15.2637 11.6992 16.084 11.1035C22.5635 6.40137 23.0566 5.99121 24.5508 4.81934C24.834 4.59961 25 4.25781 25 3.89648V2.96875C25 1.6748 23.9502 0.625 22.6562 0.625H2.34375C1.0498 0.625 0 1.6748 0 2.96875V3.89648C0 4.25781 0.166016 4.59473 0.449219 4.81934C1.94336 5.98633 2.43652 6.40137 8.91602 11.1035C9.73633 11.6992 11.3672 13.1445 12.5 13.125Z" fill="#4C3F92"></path></svg><input type="email" placeholder="Correo electrónico" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="email"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="20" viewBox="0 0 25 20" fill="none" class="self-center"><path d="M8.75 10C9.73891 10 10.7056 9.70676 11.5279 9.15735C12.3501 8.60794 12.991 7.82705 13.3694 6.91342C13.7478 5.99979 13.8469 4.99446 13.6539 4.02455C13.461 3.05465 12.9848 2.16373 12.2855 1.46447C11.5863 0.765206 10.6954 0.289002 9.72545 0.0960758C8.75555 -0.0968503 7.75021 0.00216641 6.83658 0.380605C5.92295 0.759043 5.14206 1.39991 4.59265 2.22215C4.04324 3.0444 3.75 4.0111 3.75 5C3.75 6.32609 4.27678 7.59785 5.21447 8.53554C6.15215 9.47322 7.42392 10 8.75 10ZM12.5 12.5C12.5028 12.0825 12.6117 11.6725 12.8164 11.3086C12.6289 11.2891 12.4453 11.25 12.25 11.25H11.5977C10.7048 11.6618 9.73324 11.875 8.75 11.875C7.76676 11.875 6.79522 11.6618 5.90234 11.25H5.25C3.85771 11.2503 2.52253 11.8035 1.53803 12.788C0.553534 13.7725 0.000310675 15.1077 0 16.5L0 18.125C0 18.6223 0.197544 19.0992 0.549175 19.4508C0.900805 19.8025 1.37772 20 1.875 20H12.8477C12.623 19.6215 12.503 19.1901 12.5 18.75V12.5ZM23.75 11.25H22.5V8.125C22.5 7.2962 22.1708 6.50134 21.5847 5.91529C20.9987 5.32924 20.2038 5 19.375 5C18.5462 5 17.7513 5.32924 17.1653 5.91529C16.5792 6.50134 16.25 7.2962 16.25 8.125V11.25H15C14.6685 11.25 14.3505 11.3817 14.1161 11.6161C13.8817 11.8505 13.75 12.1685 13.75 12.5V18.75C13.75 19.0815 13.8817 19.3995 14.1161 19.6339C14.3505 19.8683 14.6685 20 15 20H23.75C24.0815 20 24.3995 19.8683 24.6339 19.6339C24.8683 19.3995 25 19.0815 25 18.75V12.5C25 12.1685 24.8683 11.8505 24.6339 11.6161C24.3995 11.3817 24.0815 11.25 23.75 11.25ZM19.375 16.875C19.1278 16.875 18.8861 16.8017 18.6805 16.6643C18.475 16.527 18.3148 16.3318 18.2201 16.1034C18.1255 15.8749 18.1008 15.6236 18.149 15.3811C18.1973 15.1387 18.3163 14.9159 18.4911 14.7411C18.6659 14.5663 18.8887 14.4473 19.1311 14.399C19.3736 14.3508 19.6249 14.3755 19.8534 14.4702C20.0818 14.5648 20.277 14.725 20.4143 14.9305C20.5517 15.1361 20.625 15.3778 20.625 15.625C20.625 15.9565 20.4933 16.2745 20.2589 16.5089C20.0245 16.7433 19.7065 16.875 19.375 16.875ZM20.625 11.25H18.125V8.125C18.125 7.79348 18.2567 7.47554 18.4911 7.24112C18.7255 7.0067 19.0435 6.875 19.375 6.875C19.7065 6.875 20.0245 7.0067 20.2589 7.24112C20.4933 7.47554 20.625 7.79348 20.625 8.125V11.25Z" fill="#4C3F92"></path></svg><input type="password" placeholder="Contraseña" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="password"/></div></section><section class="mt-4 2xl:mt-12 space-y-4 2xl:space-y-5"><div class="space-x-2 text-sm flex justify-start lg:justify-center text-white"><input type="checkbox" class="rounded-full focus:ring-0 checked:text-[#4ECDC4]" name="emailMarketing"/><label>Quiero recibir promociones y noticias de glik</label></div><div class="space-x-2 text-sm flex justify-start lg:justify-center text-white"><input type="checkbox" class="rounded-full focus:ring-0 checked:text-[#4ECDC4]" name="acceptTermsAndConditions"/><label>Acepto los<!-- --> <a class="underline text-secondary-orange" href="/">términos y condiciones</a></label></div></section><button type="submit" class="bg-secondary-orange text-offwhite rounded-full px-14 py-5 font-semibold mt-6 2xl:mt-10">Regístrate</button><p class="pt-7"><a class="font-semibold text-white" href="/login">¿Ya tienes una cuenta? Entra aquí</a></p></form></section></div></main><div class="2xl:col-span-2"></div></section></section></main><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(auth)/layout.css?v=1701471487028\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/components/Logo/horizontalLogo.component.tsx\",\"chunks\":[\"app/(auth)/register/page:static/chunks/app/(auth)/register/page.js\"],\"name\":\"HorizontalLogo\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/Forms/register.component.tsx\",\"c"])</script><script>self.__next_f.push([1,"hunks\":[\"app/(auth)/register/page:static/chunks/app/(auth)/register/page.js\"],\"name\":\"RegisterForm\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/register\",\"initialTree\":[\"\",{\"children\":[\"(auth)\",{\"children\":[\"register\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-navbar-color __className_e66fe9\",\"children\":[\"$\",\"main\",null,{\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(auth)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"section\",null,{\"className\":\"grid grid-cols-4 justify-items-center mx-4 gap-4 2xl:grid-cols-8 2xl:gap-4 2xl:mx-48\",\"children\":[[\"$\",\"div\",null,{\"className\":\"2xl:col-span-2\"}],[\"$\",\"main\",null,{\"className\":\"col-span-4\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(auth)\",\"children\",\"register\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"div\",null,{\"className\":\"py-6 text-center space-y-5\",\"children\":[[\"$\",\"$L8\",null,{}],[\"$\",\"section\",null,{\"className\":\"space-y-5\",\"children\":[[\"$\",\"h1\",null,{\"className\":\"font-bold text-2xl 2xl:text-3xl text-white\",\"children\":\"Regístrate\"}],[\"$\",\"h3\",null,{\"className\":\"2xl:text-xl 2xl:font-medium text-white\",\"children\":\"Crear una nueva cuenta\"}]]}],[\"$\",\"section\",null,{\"children\":[\"$\",\"$L9\",null,{}]}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}],[\"$\",\"div\",null,{\"className\":\"2xl:col-span-2\"}]]}],null],\"segment\":\"register\"},\"styles\":[]}]}]}]}]}],null],\"segment\":\"(auth)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(auth)/layout.css?v=1701471487028\",\"precedence\":\"next_static/css/app/(auth)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik - Autenticación\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Servicio de autenticación de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Evidence <form>
Solution Fase: Arquitectura y Diseño
Utilizar una biblioteca o framework verificado y confiable que evite esta vulnerabilidad o proporcione elementos que faciliten evitarla.
Por ejemplo, utilice el paquete anti-CSRG como el CSRGuard de OWASP.
Fase: Implementación
Asegúrese de que su aplicación esté libre de fallas de secuencias de comandos entre sitios, ya que la mayoría de las defensas de CSRF pueden detenerse por alto por medio del uso de secuencias de comandos manejadas por el atacante.
Fase: Arquitectura y Diseño
Origina un nonce único para cada uno de los formularios, coloque el nonce en el formularo y confirme la independencia al obtener el formulario. Asegúrese de que el nonce no sea predecible (CWE-330).
Usted tiene que tener en cuenta que esto puede pasar desapercibido utilizando XSS.
Identificar las operaciones que sean especialmente peligrosas. Cuando el usuario desarrolla una operación peligrosa, envíe una solicitud de confirmación de forma separada para poder garantizar que el usuario tenga la intención de desarrollar esa operación.
Usted tiene que tener en cuenta que esto puede pasar desapercibido utilizando XSS.
Utilice el control de gestión de la sesión de ESAPI.
Este control introduce un elemento para CSRF.
No utilice el método GET para ninguna de las solicitudes que puedan desencadenar un cambio de estado.
Fase: Implementación
Revise que la solicitud se creó en la página esperada. Esto podría quebrar la funcionalidad auténtica, ya que los usuarios o los representantes puede ser que hayan desactivado el envío de Referer por motivos de privacidad.
-
-
-
Risk=Bajo, Confidence=Media (2)
-
http://localhost:3000 (2)
-
El servidor divulga información mediante un campo(s) de encabezado de respuesta HTTP ''''X-Powered-By'''' (1)
GET http://localhost:3000/
Alert tags Alert description El servidor de la web/aplicación está divulgando información mediante uno o más encabezados de respuesta HTTP ''''X-Powered-By''''. El acceso a tal información podría facilitarle a los atacantes la identificación de otros marcos/componentes de los que su aplicación web depende y las vulnerabilidades a las que pueden estar sujetos tales componentes.
Request Request line and header section (229 bytes)
GET http://localhost:3000/ HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:57:51 GMT connection: close content-length: 56229
Response body (56229 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(dashboard)/layout.css?v=1701471471735" data-precedence="next_static/css/app/(dashboard)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik</title><meta name="description" content="Página de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-offwhite __className_e66fe9"><div><div class="2xl:hidden"><nav class="bg-navbar-color p-5 space-y-5"><div class="grid grid-cols-2"><section class="flex space-x-2 items-center"><figure class="max-w-[80px]"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure></section><section class="flex justify-end pr-2 items-center"><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg></a></section></div><section><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></section></nav></div><div class="hidden 2xl:block"><nav class="bg-navbar-color"><div class="grid grid-cols-4 2xl:grid-cols-5 justify-items-stretch gap-4 2xl:gap-4 border-b border-b-gray-border 2xl:px-6 px-4 py-4 2xl:items-center"><figure class="flex col-span-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="2xl:hidden"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#1C1C1C"></path></svg><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure><div class="col-span-1"></div><div class="col-span-2 flex items-center "><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></div><div class="col-span-1"><ul class="flex justify-end text-center align-middle text-white text-sm"><li><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg><p>Iniciar Sesión</p></a></li></ul></div></div></nav></div></div><main class="grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48"><section class="col-span-4 2xl:col-span-8"><main class="space-y-7"><div class="fixed bottom-5 right-5"> <div class="fixed bottom-5 right-5 md:right-5 z-50 space-y-4 md:space-y-0 md:flex md:flex-col p-2"><a target="_blank" rel="noopener noreferrer" href="https://www.instagram.com/glik.ve/"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="#000000"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://www.tiktok.com/@glik7"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></a></div></div><figure><img alt="Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS" loading="lazy" width="1920" height="1080" decoding="async" data-nimg="1" class="mx-auto mt-5" style="color:transparent" src="/_next/static/media/glik_banner.126325ef.webp"/></figure><h3 class="text-lg font-bold 2xl:text-3xl text-center 2xl:text-left">Modelos disponibles</h3><div class="space-y-3 2xl:space-y-0 2xl:grid 2xl:grid-cols-8 2xl:gap-4 2xl:justify-items-stretch pb-8"></div></main></section></main><div class="mx-auto max-md:hidden mt-2"><footer class="bg-navbar-color py-1 text-black lg:px-48"><div class="flex align-middle mt-4"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras blancas y foto de un conejo" loading="lazy" width="201" height="70" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></div><hr class="my-8 h-0.5 border-t-0 bg-neutral-100 opacity-50 dark:opacity-50"/><div class="px-4 max-w-full mt-8 md:grid md:grid-cols-4 gap-4 2xl:grid 2xl:grid-cols-4 justify-items-center align-middle"> <div class="col-span-1"><p class="my-2 text-white font-bold">$ USD</p><p class="my-2 text-white">Copyright Glik.ve</p><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M24.9292 8.68964C25.0796 10.0467 24.5379 11.3839 23.7462 12.3668C22.9201 13.3345 21.5985 14.0746 20.3113 13.9793C20.1428 12.6735 20.795 11.285 21.5251 10.4379C22.3503 9.47652 23.7834 8.74 24.9292 8.68964Z" fill="white"></path><path d="M29.1431 16.5179C28.9994 16.603 26.6188 18.0136 26.6449 20.8903C26.6757 24.3643 29.7066 25.5127 29.7429 25.5244C29.7248 25.6053 29.2682 27.1836 28.1314 28.7825C27.1821 30.1926 26.1875 31.5712 24.6077 31.5946C23.8564 31.6122 23.3491 31.3979 22.8205 31.1745C22.2694 30.9416 21.6951 30.6989 20.7968 30.6989C19.8445 30.6989 19.2447 30.9496 18.6663 31.1914C18.1659 31.4005 17.6814 31.603 16.9986 31.6306C15.494 31.6854 14.3445 30.1269 13.3607 28.7294C11.3942 25.8778 9.8633 20.6934 11.9159 17.1655C12.9105 15.4352 14.724 14.321 16.6625 14.2913C17.5162 14.274 18.3349 14.6006 19.0526 14.8869C19.6015 15.1058 20.0913 15.3012 20.4924 15.3012C20.8448 15.3012 21.3208 15.1137 21.8757 14.895C22.7501 14.5505 23.8201 14.1289 24.9102 14.2428C25.6557 14.2643 27.7772 14.535 29.1459 16.5162L29.1431 16.5179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M40.0404 9.46415H37.9139V15.7451H40.0404C41.9213 15.7451 43.0261 14.5829 43.0261 12.6025C43.0261 10.6263 41.9169 9.46415 40.0404 9.46415ZM38.7031 10.1693V15.04H39.9877C41.4215 15.04 42.2194 14.1694 42.2194 12.6112C42.2194 11.0398 41.4258 10.1693 39.9877 10.1693H38.7031Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M46.0745 15.8235C44.8118 15.8235 43.9612 14.9225 43.9612 13.4817C43.9612 12.0366 44.8118 11.1399 46.0745 11.1399C47.3328 11.1399 48.1834 12.0366 48.1834 13.4817C48.1834 14.9225 47.3328 15.8235 46.0745 15.8235ZM47.4074 13.4817C47.4074 14.5481 46.8812 15.1575 46.0745 15.1575C45.2678 15.1575 44.7372 14.5481 44.7372 13.4817C44.7372 12.4153 45.2678 11.8059 46.0745 11.8059C46.8812 11.8059 47.4074 12.4153 47.4074 13.4817Z" fill="white"></path><path d="M53.003 15.7451H53.7791L55.0506 11.2183H54.2964L53.3845 14.9007H53.367L52.3322 11.2183H51.5956L50.5653 14.9007H50.5478L49.6358 11.2183H48.8773L50.1532 15.7451H50.9292L51.9552 12.2412H51.9727L53.003 15.7451Z" fill="white"></path><path d="M56.6915 11.2183H55.9725V15.7451H56.7354V13.0813C56.7354 12.3152 57.2045 11.8103 57.9235 11.8103C58.625 11.8103 58.9714 12.2107 58.9714 12.942V15.7451H59.7343V12.807C59.7343 11.7798 59.1556 11.1399 58.1559 11.1399C57.45 11.1399 56.9633 11.4533 56.7091 11.9408H56.6915V11.2183Z" fill="white"></path><path d="M61.042 9.46415V15.7451H61.8049V9.46415H61.042Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.911 13.4817C62.911 14.9225 63.7615 15.8235 65.0243 15.8235C66.2826 15.8235 67.1332 14.9225 67.1332 13.4817C67.1332 12.0366 66.2826 11.1399 65.0243 11.1399C63.7615 11.1399 62.911 12.0366 62.911 13.4817ZM65.0242 15.1575C65.831 15.1575 66.3571 14.5481 66.3571 13.4817C66.3571 12.4153 65.831 11.8059 65.0242 11.8059C64.2175 11.8059 63.687 12.4153 63.687 13.4817C63.687 14.5481 64.2175 15.1575 65.0242 15.1575Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.5326 15.8235C68.625 15.8235 68.0156 15.2794 68.0156 14.4654C68.0156 13.6906 68.6163 13.2031 69.6685 13.1422L70.9751 13.0682V12.6895C70.9751 12.1367 70.6068 11.8059 69.9754 11.8059C69.3879 11.8059 69.0196 12.0801 68.9232 12.5241H68.1866C68.2392 11.7406 68.9144 11.1399 69.993 11.1399C71.0628 11.1399 71.738 11.7145 71.738 12.6155V15.7451H71.0145V14.966H70.997C70.7252 15.484 70.1464 15.8235 69.5326 15.8235ZM70.9751 14.0258C70.9751 14.6787 70.4226 15.1793 69.7036 15.1793C69.1555 15.1793 68.7916 14.8963 68.7916 14.4654C68.7916 14.0389 69.1424 13.769 69.7562 13.7298L70.9751 13.6558V14.0258Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M72.7826 13.4817C72.7826 14.9007 73.5718 15.8235 74.7337 15.8235C75.3914 15.8235 75.9131 15.5014 76.2069 14.979H76.22V15.7451H76.9478V9.46415H76.1849V11.9539H76.1674C75.8956 11.4577 75.3694 11.1399 74.7162 11.1399C73.5674 11.1399 72.7826 12.0627 72.7826 13.4817ZM74.8784 11.8059C74.0717 11.8059 73.5631 12.4588 73.5631 13.4817C73.5631 14.509 74.0717 15.1575 74.8784 15.1575C75.6632 15.1575 76.1893 14.4959 76.1893 13.4817C76.1893 12.4719 75.6632 11.8059 74.8784 11.8059Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M82.3079 15.8235C81.0452 15.8235 80.1946 14.9225 80.1946 13.4817C80.1946 12.0366 81.0452 11.1399 82.3079 11.1399C83.5663 11.1399 84.4168 12.0366 84.4168 13.4817C84.4168 14.9225 83.5663 15.8235 82.3079 15.8235ZM83.6408 13.4817C83.6408 14.5481 83.1147 15.1575 82.3079 15.1575C81.5012 15.1575 80.9707 14.5481 80.9707 13.4817C80.9707 12.4153 81.5012 11.8059 82.3079 11.8059C83.1147 11.8059 83.6408 12.4153 83.6408 13.4817Z" fill="white"></path><path d="M86.2025 11.2183H85.4834V15.7451H86.2463V13.0813C86.2463 12.3152 86.7154 11.8103 87.4345 11.8103C88.136 11.8103 88.4824 12.2107 88.4824 12.942V15.7451H89.2453V12.807C89.2453 11.7798 88.6665 11.1399 87.6669 11.1399C86.961 11.1399 86.4743 11.4533 86.22 11.9408H86.2025V11.2183Z" fill="white"></path><path d="M93.6627 10.1258H92.8998V11.2183H92.2202V11.8407H92.8998V14.5699C92.8998 15.4404 93.2243 15.7799 94.0617 15.7799C94.2414 15.7799 94.4519 15.7669 94.544 15.7451V15.1096C94.4914 15.1183 94.316 15.1314 94.2283 15.1314C93.8381 15.1314 93.6627 14.9442 93.6627 14.5307V11.8407H94.5484V11.2183H93.6627V10.1258Z" fill="white"></path><path d="M95.6982 9.46415V15.7451H96.4611V13.1074C96.4611 12.3239 96.9303 11.8103 97.6888 11.8103C98.4034 11.8103 98.7673 12.2412 98.7673 12.9594V15.7451H99.5302V12.8201C99.5302 11.8103 98.9252 11.1399 97.9255 11.1399C97.2328 11.1399 96.733 11.4359 96.4787 11.9408H96.4611V9.46415H95.6982Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M104.573 14.448H103.824C103.697 14.8746 103.271 15.1662 102.693 15.1662C101.873 15.1662 101.36 14.596 101.36 13.7298V13.6863H104.63V13.399C104.63 12.0279 103.872 11.1399 102.64 11.1399C101.382 11.1399 100.575 12.0932 100.575 13.4991C100.575 14.9225 101.368 15.8235 102.675 15.8235C103.67 15.8235 104.442 15.2402 104.573 14.448ZM102.627 11.7972C101.912 11.7972 101.412 12.3413 101.364 13.0943H103.841C103.824 12.3369 103.346 11.7972 102.627 11.7972Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M45.3018 31.1427L44.197 27.9019H39.5933L38.4884 31.1427H36.5382L40.8991 19.1517H42.9247L47.2856 31.1427H45.3018ZM40.0704 26.4061L41.87 21.1461H41.9202L43.7198 26.4061H40.0704Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.1019 26.7718C57.1019 24.0046 55.6287 22.2596 53.3939 22.2596C52.1216 22.2596 51.1088 22.8994 50.5898 23.9049H50.5564V22.4008H48.807V34.0345H50.6149V29.7051H50.6568C51.159 30.6773 52.1634 31.2922 53.4274 31.2922C55.6371 31.2922 57.1019 29.5389 57.1019 26.7718ZM52.9168 29.7716C54.3481 29.7716 55.2437 28.6082 55.2437 26.7718C55.2437 24.9436 54.3481 23.7719 52.9168 23.7719C51.5357 23.7719 50.6066 24.9685 50.6066 26.7718C50.6066 28.5916 51.5273 29.7716 52.9168 29.7716Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.4864 22.2596C65.7213 22.2596 67.1944 24.0046 67.1944 26.7718C67.1944 29.5389 65.7296 31.2922 63.5199 31.2922C62.256 31.2922 61.2515 30.6773 60.7493 29.7051H60.7075V34.0345H58.8995V22.4008H60.6489V23.9049H60.6824C61.2013 22.8994 62.2141 22.2596 63.4864 22.2596ZM65.3362 26.7718C65.3362 28.6082 64.4406 29.7716 63.0093 29.7716C61.6198 29.7716 60.6991 28.5916 60.6991 26.7718C60.6991 24.9685 61.6282 23.7719 63.0093 23.7719C64.4406 23.7719 65.3362 24.9436 65.3362 26.7718Z" fill="white"></path><path d="M74.4056 27.8022H72.5558C72.673 29.971 74.4809 31.3421 77.1594 31.3421C80.0221 31.3421 81.8217 29.9378 81.8217 27.6941C81.8217 25.9408 80.7921 24.9519 78.3145 24.3702L76.9837 24.0462C75.4268 23.6639 74.7906 23.1653 74.7906 22.3177C74.7906 21.2541 75.7867 20.5228 77.2431 20.5228C78.6996 20.5228 79.6956 21.2458 79.8044 22.4424H81.6291C81.5705 20.3733 79.8212 18.9523 77.2682 18.9523C74.6902 18.9523 72.8739 20.3733 72.8739 22.4424C72.8739 24.1126 73.9034 25.143 76.1215 25.6749L77.6868 26.0488C79.252 26.4311 79.9132 26.9878 79.9132 27.9185C79.9132 28.9905 78.8167 29.7716 77.2934 29.7716C75.703 29.7716 74.5395 28.9905 74.4056 27.8022Z" fill="white"></path><path d="M86.0383 20.3317H84.2219V22.4008H82.9413V23.8218H84.2219V28.8409C84.2219 30.5278 84.9167 31.2008 86.6995 31.2008C87.1013 31.2008 87.5031 31.1676 87.704 31.1177V29.6968C87.5868 29.7217 87.2938 29.7383 87.1097 29.7383C86.3731 29.7383 86.0383 29.3976 86.0383 28.6414V23.8218H87.7123V22.4008H86.0383V20.3317Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M88.9994 26.7718C88.9994 29.5888 90.6567 31.3089 93.1761 31.3089C95.6956 31.3089 97.3529 29.5888 97.3529 26.7718C97.3529 23.9631 95.6872 22.2429 93.1761 22.2429C90.665 22.2429 88.9994 23.9631 88.9994 26.7718ZM93.1761 29.8297C94.5991 29.8297 95.5114 28.7162 95.5114 26.7718C95.5114 24.8356 94.5907 23.7221 93.1761 23.7221C91.7615 23.7221 90.8408 24.8356 90.8408 26.7718C90.8408 28.7162 91.7615 29.8297 93.1761 29.8297Z" fill="white"></path><path d="M99.1589 22.4008H100.883V23.8883H100.925C101.218 22.8662 102.005 22.2596 103.043 22.2596C103.302 22.2596 103.528 22.3011 103.662 22.326V23.9963C103.52 23.9381 103.202 23.8966 102.85 23.8966C101.687 23.8966 100.967 24.6694 100.967 25.9075V31.1427H99.1589V22.4008Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M111.026 28.5812H112.742C112.491 30.1766 110.967 31.3151 108.95 31.3151C106.364 31.3151 104.798 29.5783 104.798 26.8195C104.798 24.0773 106.389 22.2492 108.875 22.2492C111.319 22.2492 112.842 23.961 112.842 26.6118V27.2267H106.623V27.3347C106.623 28.8554 107.544 29.8609 108.992 29.8609C110.021 29.8609 110.783 29.3457 111.026 28.5812ZM106.623 26.0752L111.026 26.0338C111.026 25.6655 110.871 24.9827 110.506 24.6207C110.141 24.2586 109.604 23.9837 108.875 23.9837C107.406 23.9837 106.623 24.9579 106.623 26.0752Z" fill="white"></path></svg></div><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M38.1173 11.1907H35.5787V11.9386H37.3793C37.2902 12.9874 36.4113 13.4347 35.5818 13.4347C34.5204 13.4347 33.5941 12.6056 33.5941 11.4435C33.5941 10.3115 34.477 9.4397 35.584 9.4397C36.4382 9.4397 36.9415 9.98015 36.9415 9.98015L37.4689 9.43788C37.4689 9.43788 36.7919 8.68964 35.5571 8.68964C33.9847 8.68964 32.7684 10.0071 32.7684 11.4301C32.7684 12.8246 33.9126 14.1841 35.5971 14.1841C37.0788 14.1841 38.1634 13.1766 38.1634 11.6866C38.1634 11.3723 38.1173 11.1907 38.1173 11.1907Z" fill="white"></path><path d="M38.5956 23.2445H44.1741C44.178 23.2602 44.275 23.6573 44.275 24.334C44.275 27.6082 41.8918 29.8224 38.6362 29.8224C34.9344 29.8224 32.4202 26.8347 32.4202 23.7706C32.4202 20.6437 35.0931 17.7486 38.5481 17.7487C41.2614 17.7487 42.7492 19.3929 42.7492 19.3929L41.59 20.5845C41.59 20.5845 40.4842 19.3967 38.6073 19.3967C36.1749 19.3967 34.2348 21.3124 34.2348 23.7999C34.2348 26.3533 36.27 28.1752 38.6023 28.1752C40.4252 28.1752 42.3565 27.1923 42.552 24.8879H38.5956V23.2445Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.9867 25.903C44.9867 23.8309 46.6271 22.0543 48.9162 22.0543C50.7978 22.0543 52.8382 23.378 52.8382 25.9482C52.8382 28.1906 51.0841 29.8153 48.9429 29.8153C46.5777 29.8153 44.9867 28.0057 44.9867 25.903ZM51.1313 25.9379C51.1313 24.482 50.0646 23.5785 48.9389 23.5785C47.6741 23.5785 46.702 24.5824 46.702 25.9266C46.702 27.3003 47.6862 28.2921 48.9337 28.2921C50.069 28.2921 51.1313 27.3628 51.1313 25.9379Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.555 22.0543C55.266 22.0543 53.6255 23.8309 53.6255 25.903C53.6255 28.0057 55.2166 29.8153 57.582 29.8153C59.723 29.8153 61.4772 28.1906 61.4772 25.9482C61.4772 23.378 59.4368 22.0543 57.555 22.0543ZM57.5778 23.5785C58.7034 23.5785 59.7702 24.482 59.7702 25.9379C59.7702 27.3628 58.7079 28.2921 57.5725 28.2921C56.3251 28.2921 55.341 27.3003 55.341 25.9266C55.341 24.5824 56.3129 23.5785 57.5778 23.5785Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.2641 25.9357C62.2641 23.8853 63.9158 22.0584 66.0167 22.0584C66.9315 22.0584 67.6205 22.4099 68.1244 22.949V22.2917H69.7632V29.2646C69.7632 32.0043 68.1711 33.3103 66.082 33.3103C64.1722 33.3103 63.0994 32.1446 62.5663 31.0252L64.0686 30.4018C64.2767 30.9018 64.8756 31.7836 66.0695 31.7836C67.3055 31.7836 68.1243 30.9815 68.1243 29.6427V28.8775C67.687 29.3813 67.0947 29.8205 65.9805 29.8205C64.1788 29.8205 62.2641 28.2715 62.2641 25.9357ZM66.1688 23.5796C67.199 23.5796 68.2568 24.4528 68.2568 25.944C68.2568 27.4598 67.2012 28.2951 66.1461 28.2951C65.0261 28.2951 63.9838 27.3922 63.9838 25.9584C63.9838 24.4686 65.0663 23.5796 66.1688 23.5796Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M73.7486 25.9245C73.7486 23.6146 75.4125 22.0491 77.3944 22.0491C78.9576 22.0491 80.1387 23.0841 80.645 24.3232L80.9172 24.9559L75.6759 27.1149C75.989 27.6935 76.4943 28.2909 77.593 28.291C78.5713 28.291 79.1575 27.763 79.5082 27.2227L80.8593 28.1153C80.2535 28.9201 79.2386 29.8183 77.5848 29.8183C75.6033 29.8183 73.7486 28.3687 73.7486 25.9245ZM77.4628 23.5416C78.177 23.5416 78.6909 23.9184 78.9092 24.3705L75.409 25.8228C75.2581 24.6984 76.3313 23.5416 77.4628 23.5416Z" fill="white"></path><path d="M72.7991 29.5879H71.0775V18.1501H72.7991V29.5879Z" fill="white"></path><path d="M94.1596 29.5879H95.8812V18.1501H94.1596V29.5879Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.7517 29.5879H85.0301V18.1501L89.1945 18.1499C91.2132 18.1499 92.8648 19.7896 92.8648 21.7937C92.8648 23.7977 91.2132 25.4373 89.1945 25.4373H86.7517V29.5879ZM86.7516 23.7282V19.8591H89.1945C90.263 19.8591 91.1433 20.7329 91.1433 21.7937C91.1433 22.8544 90.263 23.7282 89.1945 23.7282H86.7516Z" fill="white"></path><path d="M108.592 33.3103L113.577 22.0493H111.696L109.441 27.1452L107.185 22.0493H105.305L108.5 29.2692L106.712 33.3103H108.592Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.927 29.5879H104.649V25.4742C104.918 21.2314 99.4999 20.2336 97.4497 23.2921L98.8351 24.215C99.8375 22.4751 102.698 22.8755 102.886 24.7401C102.026 24.514 101.098 24.3501 100.249 24.4353C98.9247 24.5684 97.7907 25.4034 97.6105 26.7712C97.5131 27.5103 97.6793 28.4213 98.199 28.9765C99.0089 29.8415 100.339 29.9581 101.431 29.6625C102.046 29.4961 102.53 29.1333 102.927 28.6647V29.5879ZM101.022 28.1717C101.964 27.9169 102.707 27.2327 102.927 26.2816C102.445 26.1267 102.002 26.0017 101.494 25.9408C98.5359 25.4993 99.0312 28.7104 101.022 28.1717Z" fill="white"></path><path d="M49.2771 14.0775H48.4937V8.87231H49.2771V14.0775Z" fill="white"></path><path d="M44.1061 14.0775H44.8896V9.65006H46.1757V8.87231H42.82V9.65006H44.1061V14.0775Z" fill="white"></path><path d="M41.994 14.0775H38.9893V8.87231H41.994V9.65006H39.7729V11.0861H41.7266V11.8638H39.7729V13.2997H41.994V14.0775Z" fill="white"></path><path d="M51.9844 14.0775V9.65006H53.2705V8.87231H49.915V9.65006H51.201V14.0775H51.9844Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M55.2864 11.4301C55.2864 10.007 56.5028 8.68964 58.0751 8.68964C59.6475 8.68964 60.8639 10.007 60.8639 11.4301C60.8639 12.8134 59.7378 14.1623 58.0751 14.1836C56.4125 14.1623 55.2864 12.8134 55.2864 11.4301ZM58.0751 13.4343C57.0241 13.4215 56.1122 12.5966 56.1122 11.4435C56.1122 10.3207 56.9808 9.45397 58.0751 9.43995C59.1695 9.45397 60.0381 10.3207 60.0381 11.4435C60.0381 12.5966 59.1262 13.4215 58.0751 13.4343Z" fill="white"></path><path d="M62.43 14.0775H61.6464V8.87231H62.43L64.9449 12.6619V8.87231H65.7285V14.0775H64.9463L62.43 10.286V14.0775Z" fill="white"></path><path d="M11.3758 15.1822L20.2279 23.9572L11.4183 32.8091C11.1612 32.647 11.0234 32.2958 11.021 31.8421L10.9412 16.1313C10.9387 15.6345 11.1208 15.3315 11.3758 15.1822Z" fill="white"></path><path d="M12.3827 15.1941L23.147 21.0242L20.5941 23.5892L12.0071 15.0769C12.1372 15.0938 12.2678 15.1317 12.3827 15.1941Z" fill="white"></path><path d="M23.6257 26.5943L20.9628 23.9546L23.623 21.282L27.2863 23.2659C28.1887 23.7544 27.7271 24.3656 27.2863 24.6051L23.6257 26.5943Z" fill="white"></path><path d="M12.3827 32.7031C12.3014 32.7482 12.223 32.7835 12.148 32.8116L20.5967 24.3227L23.1492 26.853L12.3827 32.7031Z" fill="white"></path></svg></div></div><div class="col-span-1"><div class="my-2 text-secondary-orange font-semibold">Contactanos</div><a href="https://www.google.com/maps/place/GLIK+7/@10.4940965,-66.8547532,17z/data=!3m1!4b1!4m6!3m5!1s0x8c2af70856c1a779:0x77aa75f245771c40!8m2!3d10.4940965!4d-66.8547532!16s%2Fg%2F11svrs7m27?entry=ttu"><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"></path><path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg></span>Casa 1722 C. Sucre, Caracas 1060, Miranda.</p></a><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"></path></svg></span> ventas@glik7.com</p><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"></path></svg></span>04128229919</p></div><div class="col-span-1"><div class="my-2 ml-2 text-secondary-orange font-semibold">Extra</div><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Nosotros</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Cómo funciona</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Terminos y condiciones</p></div><div class="col-span-1 mt-4"><div class="space-y-3"><a href="https://www.instagram.com/glik.ve/"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="white"></path></g></svg></div></a><a href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></div></a><a href="https://www.tiktok.com/@glik7"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></div></a></div></div></div></footer></div><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/config/Providers.config.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"Providers\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/navbar.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:st"])</script><script>self.__next_f.push([1,"atic/chunks/app/(dashboard)/layout.js\"],\"name\":\"Navbar\",\"async\":false}\na:I{\"id\":\"(app-client)/./src/socialNetworksButton.component.tsx\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"\",\"async\":false}\nb:I{\"id\":\"(app-client)/./node_modules/next/dist/client/image-component.js\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"Image\",\"async\":false}\nc:I{\"id\":\"(app-client)/./src/components/Product/productsList.component.tsx\",\"chunks\":[\"app/(dashboard)"])</script><script>self.__next_f.push([1,"/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"ProductsList\",\"async\":false}\nd:I{\"id\":\"(app-client)/./src/components/Footer/footer.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"(dashboard)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-offwhite __className_e66fe9\",\"children\":[\"$\",\"$L8\",null,{\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"className\":\"grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48\",\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(dashboard)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"main\",null,{\"className\":\"space-y-7\",\"children\":[[\"$\",\"div\",null,{\"className\":\"fixed bottom-5 right-5\",\"children\":[\" \",[\"$\",\"$La\",null,{}]]}],[\"$\",\"figure\",null,{\"children\":[\"$\",\"$Lb\",null,{\"src\":{\"src\":\"/_next/static/media/glik_banner.126325ef.webp\",\"height\":509,\"width\":1532,\"blurDataURL\":\"/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fglik_banner.126325ef.webp\u0026w=8\u0026q=70\",\"blurWidth\":8,\"blurHeight\":3},\"alt\":\"Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS\",\"width\":1920,\"height\":1080,\"className\":\"mx-auto mt-5\"}]}],[\"$\",\"h3\",null,{\"className\":\"text-lg font-bold 2xl:text-3xl text-center 2xl:text-left\",\"children\":\"Modelos disponibles\"}],[\"$\",\"$Lc\",null,{}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}]}],[\"$\",\"$Ld\",null,{}]]}]}]}],null],\"segment\":\"(dashboard)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",\"precedence\":\"next_static/css/app/(dashboard)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Página de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Evidence x-powered-by: Next.js
Solution Asegúrese que su servidor web, servidor de aplicación, equilibrador de carga, etc. está configurado para suprimir encabezados ''''X-Powered-By".
-
X-Content-Type-Options Header Missing (1)
GET http://localhost:3000/_next/static/css/app/(dashboard)/layout.css?v=1701471471735
Alert tags Alert description The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.
Other info This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.
At "High" threshold this scan rule will not alert on client or server error responses.
Request Request line and header section (321 bytes)
GET http://localhost:3000/_next/static/css/app/(dashboard)/layout.css?v=1701471471735 HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache referer: http://localhost:3000/
Request body (0 bytes)
Response Status line and header section (298 bytes)
HTTP/1.1 200 OK cache-control: no-store, must-revalidate accept-ranges: bytes last-modified: Fri, 01 Dec 2023 22:57:26 GMT etag: W/"c2ab-18c2799e602" content-type: text/css; charset=UTF-8 content-length: 49835 vary: Accept-Encoding date: Fri, 01 Dec 2023 22:57:52 GMT connection: close
Response body (49835 bytes)
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[4].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[4].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src\\app\\(dashboard)\\layout.tsx","import":"Inter","arguments":[{"subsets":["latin"]}],"variableName":"inter"} ***! \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /* cyrillic-ext */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/ec159349637c90ad-s.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/513657b02c5c193f-s.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/fd4db3eb5472fc27-s.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/51ed15f9841b9f9d-s.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/05a31a2ca4975f99-s.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/d6b16ce4a6175f26-s.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: '__Inter_e66fe9'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }@font-face {font-family: '__Inter_Fallback_e66fe9';src: local("Arial");ascent-override: 90.20%;descent-override: 22.48%;line-gap-override: 0.00%;size-adjust: 107.40% }.__className_e66fe9 {font-family: '__Inter_e66fe9', '__Inter_Fallback_e66fe9';font-style: normal } /*!***************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[4].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[4].oneOf[12].use[3]!./src/app/globals.css ***! \***************************************************************************************************************************************************************************************************************************************************************/ /* ! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com *//* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) */ *, ::before, ::after { box-sizing: border-box; /* 1 */ border-width: 0; /* 2 */ border-style: solid; /* 2 */ border-color: hsl(var(--gray-six-hsl) / 1); /* 2 */ } ::before, ::after { --tw-content: ''; } /* 1. Use a consistent sensible line-height in all browsers. 2. Prevent adjustments of font size after orientation changes in iOS. 3. Use a more readable tab size. 4. Use the user's configured `sans` font-family by default. 5. Use the user's configured `sans` font-feature-settings by default. 6. Use the user's configured `sans` font-variation-settings by default. */ html { line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ -moz-tab-size: 4; /* 3 */ -o-tab-size: 4; tab-size: 4; /* 3 */ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ font-feature-settings: normal; /* 5 */ font-variation-settings: normal; /* 6 */ } /* 1. Remove the margin in all browsers. 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. */ body { margin: 0; /* 1 */ line-height: inherit; /* 2 */ } /* 1. Add the correct height in Firefox. 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 3. Ensure horizontal rules are visible by default. */ hr { height: 0; /* 1 */ color: inherit; /* 2 */ border-top-width: 1px; /* 3 */ } /* Add the correct text decoration in Chrome, Edge, and Safari. */ abbr:where([title]) { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } /* Remove the default font size and weight for headings. */ h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } /* Reset links to optimize for opt-in styling instead of opt-out. */ a { color: inherit; text-decoration: inherit; } /* Add the correct font weight in Edge and Safari. */ b, strong { font-weight: bolder; } /* 1. Use the user's configured `mono` font family by default. 2. Correct the odd `em` font sizing in all browsers. */ code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ font-size: 1em; /* 2 */ } /* Add the correct font size in all browsers. */ small { font-size: 80%; } /* Prevent `sub` and `sup` elements from affecting the line height in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } /* 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 3. Remove gaps between table borders by default. */ table { text-indent: 0; /* 1 */ border-color: inherit; /* 2 */ border-collapse: collapse; /* 3 */ } /* 1. Change the font styles in all browsers. 2. Remove the margin in Firefox and Safari. 3. Remove default padding in all browsers. */ button, input, optgroup, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 1 */ font-weight: inherit; /* 1 */ line-height: inherit; /* 1 */ color: inherit; /* 1 */ margin: 0; /* 2 */ padding: 0; /* 3 */ } /* Remove the inheritance of text transform in Edge and Firefox. */ button, select { text-transform: none; } /* 1. Correct the inability to style clickable types in iOS and Safari. 2. Remove default button styles. */ button, [type='button'], [type='reset'], [type='submit'] { -webkit-appearance: button; /* 1 */ background-color: transparent; /* 2 */ background-image: none; /* 2 */ } /* Use the modern Firefox focus style for all focusable elements. */ :-moz-focusring { outline: auto; } /* Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) */ :-moz-ui-invalid { box-shadow: none; } /* Add the correct vertical alignment in Chrome and Firefox. */ progress { vertical-align: baseline; } /* Correct the cursor style of increment and decrement buttons in Safari. */ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } /* 1. Correct the odd appearance in Chrome and Safari. 2. Correct the outline style in Safari. */ [type='search'] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } /* Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { -webkit-appearance: none; } /* 1. Correct the inability to style clickable types in iOS and Safari. 2. Change font properties to `inherit` in Safari. */ ::-webkit-file-upload-button { -webkit-appearance: button; /* 1 */ font: inherit; /* 2 */ } /* Add the correct display in Chrome and Safari. */ summary { display: list-item; } /* Removes the default spacing and border for appropriate elements. */ blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } fieldset { margin: 0; padding: 0; } legend { padding: 0; } ol, ul, menu { list-style: none; margin: 0; padding: 0; } /* Prevent resizing textareas horizontally by default. */ textarea { resize: vertical; } /* 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 2. Set the default placeholder color to the user's configured gray 400 color. */ input::-moz-placeholder, textarea::-moz-placeholder { opacity: 1; /* 1 */ color: hsl(var(--gray-four-hsl) / 1); /* 2 */ } input::placeholder, textarea::placeholder { opacity: 1; /* 1 */ color: hsl(var(--gray-four-hsl) / 1); /* 2 */ } /* Set the default cursor for buttons. */ button, [role="button"] { cursor: pointer; } /* Make sure disabled buttons don't get the pointer cursor. */ :disabled { cursor: default; } /* 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) This can trigger a poorly considered lint error in some tools but is included by design. */ img, svg, video, canvas, audio, iframe, embed, object { display: block; /* 1 */ vertical-align: middle; /* 2 */ } /* Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) */ img, video { max-width: 100%; height: auto; } /* Make elements with the HTML hidden attribute stay hidden by default */ [hidden] { display: none; } [type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-color: #fff; border-color: hsl(var(--gray-three-hsl) / var(--tw-border-opacity, 1)); border-width: 1px; border-radius: 0px; padding-top: 0.5rem; padding-right: 0.75rem; padding-bottom: 0.5rem; padding-left: 0.75rem; font-size: 1rem; line-height: 1.5rem; --tw-shadow: 0 0 #0000; } [type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: #2563eb; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); border-color: #2563eb; } input::-moz-placeholder, textarea::-moz-placeholder { color: hsl(var(--gray-three-hsl) / var(--tw-text-opacity, 1)); opacity: 1; } input::placeholder,textarea::placeholder { color: hsl(var(--gray-three-hsl) / var(--tw-text-opacity, 1)); opacity: 1; } ::-webkit-datetime-edit-fields-wrapper { padding: 0; } ::-webkit-date-and-time-value { min-height: 1.5em; text-align: inherit; } ::-webkit-datetime-edit { display: inline-flex; } ::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field { padding-top: 0; padding-bottom: 0; } select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='hsl(var(--gray-three-hsl) / var(--tw-stroke-opacity%2c 1))' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; } [multiple],[size]:where(select:not([size="1"])) { background-image: initial; background-position: initial; background-repeat: unset; background-size: initial; padding-right: 0.75rem; -webkit-print-color-adjust: unset; print-color-adjust: unset; } [type='checkbox'],[type='radio'] { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; display: inline-block; vertical-align: middle; background-origin: border-box; -webkit-user-select: none; -moz-user-select: none; user-select: none; flex-shrink: 0; height: 1rem; width: 1rem; color: #2563eb; background-color: #fff; border-color: hsl(var(--gray-three-hsl) / var(--tw-border-opacity, 1)); border-width: 1px; --tw-shadow: 0 0 #0000; } [type='checkbox'] { border-radius: 0px; } [type='radio'] { border-radius: 100%; } [type='checkbox']:focus,[type='radio']:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 2px; --tw-ring-offset-color: #fff; --tw-ring-color: #2563eb; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } [type='checkbox']:checked,[type='radio']:checked { border-color: transparent; background-color: currentColor; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; } [type='checkbox']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } [type='radio']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } [type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { border-color: transparent; background-color: currentColor; } [type='checkbox']:indeterminate { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); border-color: transparent; background-color: currentColor; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; } [type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { border-color: transparent; background-color: currentColor; } [type='file'] { background: unset; border-color: inherit; border-width: 0; border-radius: 0; padding: 0; font-size: unset; line-height: inherit; } [type='file']:focus { outline: 1px solid ButtonText; outline: 1px auto -webkit-focus-ring-color; } *, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; } ::backdrop { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .fixed { position: fixed; } .absolute { position: absolute; } .relative { position: relative; } .inset-0 { inset: 0px; } .bottom-5 { bottom: 1.25rem; } .left-0 { left: 0px; } .right-5 { right: 1.25rem; } .top-0 { top: 0px; } .col-span-1 { grid-column: span 1 / span 1; } .col-span-2 { grid-column: span 2 / span 2; } .col-span-3 { grid-column: span 3 / span 3; } .col-span-4 { grid-column: span 4 / span 4; } .col-span-5 { grid-column: span 5 / span 5; } .col-span-8 { grid-column: span 8 / span 8; } .col-start-6 { grid-column-start: 6; } .-mx-4 { margin-left: -1rem; margin-right: -1rem; } .mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; } .mx-4 { margin-left: 1rem; margin-right: 1rem; } .mx-8 { margin-left: 2rem; margin-right: 2rem; } .mx-auto { margin-left: auto; margin-right: auto; } .my-12 { margin-top: 3rem; margin-bottom: 3rem; } .my-16 { margin-top: 4rem; margin-bottom: 4rem; } .my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; } .my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; } .my-4 { margin-top: 1rem; margin-bottom: 1rem; } .my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; } .my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; } .my-8 { margin-top: 2rem; margin-bottom: 2rem; } .my-9 { margin-top: 2.25rem; margin-bottom: 2.25rem; } .mb-0 { margin-bottom: 0px; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; } .mb-8 { margin-bottom: 2rem; } .ml-2 { margin-left: 0.5rem; } .ml-3 { margin-left: 0.75rem; } .ml-4 { margin-left: 1rem; } .ml-40 { margin-left: 10rem; } .ml-5 { margin-left: 1.25rem; } .ml-auto { margin-left: auto; } .mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; } .mr-5 { margin-right: 1.25rem; } .mt-10 { margin-top: 2.5rem; } .mt-2 { margin-top: 0.5rem; } .mt-20 { margin-top: 5rem; } .mt-24 { margin-top: 6rem; } .mt-28 { margin-top: 7rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } .mt-7 { margin-top: 1.75rem; } .mt-8 { margin-top: 2rem; } .mt-9 { margin-top: 2.25rem; } .flex { display: flex; } .inline-flex { display: inline-flex; } .grid { display: grid; } .hidden { display: none; } .h-0 { height: 0px; } .h-0\.5 { height: 0.125rem; } .h-2 { height: 0.5rem; } .h-20 { height: 5rem; } .h-3 { height: 0.75rem; } .h-5 { height: 1.25rem; } .h-6 { height: 1.5rem; } .h-8 { height: 2rem; } .h-80 { height: 20rem; } .h-\[196px\] { height: 196px; } .h-full { height: 100%; } .h-screen { height: 100vh; } .min-h-screen { min-height: 100vh; } .w-1\/2 { width: 50%; } .w-2\/3 { width: 66.666667%; } .w-2\/4 { width: 50%; } .w-2\/5 { width: 40%; } .w-20 { width: 5rem; } .w-3 { width: 0.75rem; } .w-3\/12 { width: 25%; } .w-3\/4 { width: 75%; } .w-5 { width: 1.25rem; } .w-8 { width: 2rem; } .w-96 { width: 24rem; } .w-\[600px\] { width: 600px; } .w-full { width: 100%; } .max-w-\[80px\] { max-width: 80px; } .max-w-full { max-width: 100%; } .max-w-screen-xl { max-width: 1280px; } .transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } @keyframes spin { to { transform: rotate(360deg); } } .animate-spin { animation: spin 1s linear infinite; } .cursor-pointer { cursor: pointer; } .list-inside { list-style-position: inside; } .list-disc { list-style-type: disc; } .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .flex-row { flex-direction: row; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .content-center { align-content: center; } .items-start { align-items: flex-start; } .items-center { align-items: center; } .justify-start { justify-content: flex-start; } .justify-end { justify-content: flex-end; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-around { justify-content: space-around; } .justify-items-end { justify-items: end; } .justify-items-center { justify-items: center; } .justify-items-stretch { justify-items: stretch; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-x-4 { -moz-column-gap: 1rem; column-gap: 1rem; } .space-x-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.25rem * var(--tw-space-x-reverse)); margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.5rem * var(--tw-space-x-reverse)); margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-28 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(7rem * var(--tw-space-x-reverse)); margin-left: calc(7rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-3 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.75rem * var(--tw-space-x-reverse)); margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1rem * var(--tw-space-x-reverse)); margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); } .space-y-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); } .space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); } .space-y-3 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); } .space-y-36 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(9rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(9rem * var(--tw-space-y-reverse)); } .space-y-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1rem * var(--tw-space-y-reverse)); } .space-y-5 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); } .space-y-6 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); } .space-y-7 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1.75rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1.75rem * var(--tw-space-y-reverse)); } .space-y-\[5px\] > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(5px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(5px * var(--tw-space-y-reverse)); } .self-start { align-self: flex-start; } .self-end { align-self: flex-end; } .self-center { align-self: center; } .whitespace-nowrap { white-space: nowrap; } .rounded-2xl { border-radius: 1rem; } .rounded-3xl { border-radius: 1.5rem; } .rounded-full { border-radius: 9999px; } .rounded-lg { border-radius: 0.5rem; } .rounded-md { border-radius: 0.375rem; } .rounded-xl { border-radius: 0.75rem; } .rounded-l-lg { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; } .rounded-l-xl { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; } .rounded-r-lg { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; } .rounded-t { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; } .rounded-bl-lg { border-bottom-left-radius: 0.5rem; } .rounded-br-lg { border-bottom-right-radius: 0.5rem; } .border { border-width: 1px; } .border-2 { border-width: 2px; } .border-b { border-bottom-width: 1px; } .border-t { border-top-width: 1px; } .border-t-0 { border-top-width: 0px; } .border-none { border-style: none; } .border-gray-800 { --tw-border-opacity: 1; border-color: rgb(31 41 55 / var(--tw-border-opacity)); } .border-gray-border { --tw-border-opacity: 1; border-color: hsl(var(--gray-border-hsl) / var(--tw-border-opacity)); } .border-slate-500 { --tw-border-opacity: 1; border-color: rgb(100 116 139 / var(--tw-border-opacity)); } .border-white { --tw-border-opacity: 1; border-color: hsl(var(--white-hsl) / var(--tw-border-opacity)); } .border-b-gray-border { --tw-border-opacity: 1; border-bottom-color: hsl(var(--gray-border-hsl) / var(--tw-border-opacity)); } .border-t-gray-border { --tw-border-opacity: 1; border-top-color: hsl(var(--gray-border-hsl) / var(--tw-border-opacity)); } .bg-\[\#4C3F92\] { --tw-bg-opacity: 1; background-color: rgb(76 63 146 / var(--tw-bg-opacity)); } .bg-black { --tw-bg-opacity: 1; background-color: hsl(var(--black-hsl) / var(--tw-bg-opacity)); } .bg-cyan-100 { --tw-bg-opacity: 1; background-color: rgb(207 250 254 / var(--tw-bg-opacity)); } .bg-gray-100 { --tw-bg-opacity: 1; background-color: hsl(var(--gray-seven-hsl) / var(--tw-bg-opacity)); } .bg-gray-200 { --tw-bg-opacity: 1; background-color: hsl(var(--gray-six-hsl) / var(--tw-bg-opacity)); } .bg-gray-500 { --tw-bg-opacity: 1; background-color: hsl(var(--gray-three-hsl) / var(--tw-bg-opacity)); } .bg-gray-border { --tw-bg-opacity: 1; background-color: hsl(var(--gray-border-hsl) / var(--tw-bg-opacity)); } .bg-gray-category { --tw-bg-opacity: 1; background-color: hsl(var(--gray-category-hsl) / var(--tw-bg-opacity)); } .bg-green-50 { --tw-bg-opacity: 1; background-color: rgb(240 253 244 / var(--tw-bg-opacity)); } .bg-input-bg { --tw-bg-opacity: 1; background-color: hsl(var(--input-bg-hsl) / var(--tw-bg-opacity)); } .bg-navbar-color { --tw-bg-opacity: 1; background-color: hsl(var(--bg-header-hsl) / var(--tw-bg-opacity)); } .bg-neutral-100 { --tw-bg-opacity: 1; background-color: rgb(245 245 245 / var(--tw-bg-opacity)); } .bg-offwhite { --tw-bg-opacity: 1; background-color: hsl(var(--offwhite-hsl) / var(--tw-bg-opacity)); } .bg-primary { --tw-bg-opacity: 1; background-color: hsl(var(--primary-hsl) / var(--tw-bg-opacity)); } .bg-red-600 { --tw-bg-opacity: 1; background-color: rgb(220 38 38 / var(--tw-bg-opacity)); } .bg-secondary-orange { --tw-bg-opacity: 1; background-color: hsl(var(--secondary-orange-hsl) / var(--tw-bg-opacity)); } .bg-slate-200 { --tw-bg-opacity: 1; background-color: rgb(226 232 240 / var(--tw-bg-opacity)); } .bg-teal-400 { --tw-bg-opacity: 1; background-color: rgb(45 212 191 / var(--tw-bg-opacity)); } .bg-transparent { background-color: transparent; } .bg-violet-600 { --tw-bg-opacity: 1; background-color: rgb(124 58 237 / var(--tw-bg-opacity)); } .bg-violet-800 { --tw-bg-opacity: 1; background-color: rgb(91 33 182 / var(--tw-bg-opacity)); } .bg-violet-900 { --tw-bg-opacity: 1; background-color: rgb(76 29 149 / var(--tw-bg-opacity)); } .bg-white { --tw-bg-opacity: 1; background-color: hsl(var(--white-hsl) / var(--tw-bg-opacity)); } .bg-opacity-25 { --tw-bg-opacity: 0.25; } .fill-blue-600 { fill: #2563eb; } .object-contain { -o-object-fit: contain; object-fit: contain; } .object-cover { -o-object-fit: cover; object-fit: cover; } .object-fill { -o-object-fit: fill; object-fit: fill; } .p-10 { padding: 2.5rem; } .p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .px-10 { padding-left: 2.5rem; padding-right: 2.5rem; } .px-12 { padding-left: 3rem; padding-right: 3rem; } .px-14 { padding-left: 3.5rem; padding-right: 3.5rem; } .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-20 { padding-left: 5rem; padding-right: 5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; } .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .px-9 { padding-left: 2.25rem; padding-right: 2.25rem; } .px-\[10px\] { padding-left: 10px; padding-right: 10px; } .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; } .py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; } .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .pb-20 { padding-bottom: 5rem; } .pb-3 { padding-bottom: 0.75rem; } .pb-8 { padding-bottom: 2rem; } .pl-3 { padding-left: 0.75rem; } .pl-4 { padding-left: 1rem; } .pr-12 { padding-right: 3rem; } .pr-2 { padding-right: 0.5rem; } .pr-5 { padding-right: 1.25rem; } .pt-3 { padding-top: 0.75rem; } .pt-4 { padding-top: 1rem; } .pt-5 { padding-top: 1.25rem; } .pt-7 { padding-top: 1.75rem; } .pt-8 { padding-top: 2rem; } .text-center { text-align: center; } .text-right { text-align: right; } .text-justify { text-align: justify; } .text-end { text-align: end; } .align-middle { vertical-align: middle; } .text-2xl { font-size: 1.5rem; line-height: 2rem; } .text-3xl { font-size: 1.875rem; line-height: 2.25rem; } .text-4xl { font-size: 2.25rem; line-height: 2.5rem; } .text-\[10px\] { font-size: 10px; } .text-\[28px\] { font-size: 28px; } .text-\[32px\] { font-size: 32px; } .text-base { font-size: 1rem; line-height: 1.5rem; } .text-lg { font-size: 1.125rem; line-height: 1.75rem; } .text-sm { font-size: 0.875rem; line-height: 1.25rem; } .text-xl { font-size: 1.25rem; line-height: 1.75rem; } .text-xs { font-size: 0.75rem; line-height: 1rem; } .font-bold { font-weight: 700; } .font-light { font-weight: 300; } .font-medium { font-weight: 500; } .font-normal { font-weight: 400; } .font-semibold { font-weight: 600; } .leading-relaxed { line-height: 1.625; } .text-black { --tw-text-opacity: 1; color: hsl(var(--black-hsl) / var(--tw-text-opacity)); } .text-gray-200 { --tw-text-opacity: 1; color: hsl(var(--gray-six-hsl) / var(--tw-text-opacity)); } .text-gray-300 { --tw-text-opacity: 1; color: hsl(var(--gray-five-hsl) / var(--tw-text-opacity)); } .text-gray-400 { --tw-text-opacity: 1; color: hsl(var(--gray-four-hsl) / var(--tw-text-opacity)); } .text-gray-500 { --tw-text-opacity: 1; color: hsl(var(--gray-three-hsl) / var(--tw-text-opacity)); } .text-gray-800 { --tw-text-opacity: 1; color: rgb(31 41 55 / var(--tw-text-opacity)); } .text-gray-900 { --tw-text-opacity: 1; color: rgb(17 24 39 / var(--tw-text-opacity)); } .text-gray-price { --tw-text-opacity: 1; color: hsl(var(--gray-price-hsl) / var(--tw-text-opacity)); } .text-green-400 { --tw-text-opacity: 1; color: rgb(74 222 128 / var(--tw-text-opacity)); } .text-offwhite { --tw-text-opacity: 1; color: hsl(var(--offwhite-hsl) / var(--tw-text-opacity)); } .text-orange-500 { --tw-text-opacity: 1; color: rgb(249 115 22 / var(--tw-text-opacity)); } .text-primary { --tw-text-opacity: 1; color: hsl(var(--primary-hsl) / var(--tw-text-opacity)); } .text-red-500 { --tw-text-opacity: 1; color: rgb(239 68 68 / var(--tw-text-opacity)); } .text-red-600 { --tw-text-opacity: 1; color: rgb(220 38 38 / var(--tw-text-opacity)); } .text-secondary { --tw-text-opacity: 1; color: hsl(var(--secondary-hsl) / var(--tw-text-opacity)); } .text-secondary-orange { --tw-text-opacity: 1; color: hsl(var(--secondary-orange-hsl) / var(--tw-text-opacity)); } .text-white { --tw-text-opacity: 1; color: hsl(var(--white-hsl) / var(--tw-text-opacity)); } .underline { text-decoration-line: underline; } .line-through { text-decoration-line: line-through; } .opacity-100 { opacity: 1; } .opacity-50 { opacity: 0.5; } .shadow { --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-sm { --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .blur-md { --tw-blur: blur(12px); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } .filter { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } .backdrop-blur-sm { --tw-backdrop-blur: blur(4px); -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); } :root { --foreground-rgb: 0 0 0; --background-start-rgb: 214 219 220; --background-end-rgb: 255 255 255; --primary-hsl: 257deg 62% 45%; --secondary-hsl: 218deg 36% 15%; --secondary-light-hsl: 206deg 45% 79%; --secondary-lighter-hsl: 223deg 23% 88%; --secondary-orange-hsl: 31deg 100% 53%; --offwhite-hsl: 0deg 0% 99%; --black-hsl: 0deg 0% 0%; --gray-one-hsl: 215deg 28% 17%; --gray-two-hsl: 217deg 19% 27%; --gray-three-hsl: 215deg 14% 34%; --gray-four-hsl: 220deg 9% 46%; --gray-five-hsl: 218deg 11% 65%; --gray-six-hsl: 216deg 12% 84%; --gray-seven-hsl: 220deg 14% 96%; --gray-category-hsl: 204deg 19% 95%; --gray-border-hsl: 213deg 15% 89%; --gray-price-hsl: 213deg 13% 59%; --white-hsl: 0deg 0% 100%; --input-foreground-hsl: 234deg 18% 69%; --input-bg-hsl: 233deg 30% 95%; --body-bg-hsl: 0deg 0% 88%; --bg-header-hsl: 262deg 65% 45%; } @media (prefers-color-scheme: dark) { :root { --foreground-rgb: 255, 255, 255; --background-start-rgb: 0, 0, 0; --background-end-rgb: 0, 0, 0; --primary-hsl: 257deg 62% 45%; --secondary-hsl: 218deg 36% 15%; --secondary-light-hsl: 206deg 45% 79%; --secondary-lighter-hsl: 223deg 23% 88%; --secondary-orange-hsl: 31deg 100% 53%; --offwhite-hsl: 0deg 0% 99%; --black-hsl: 0deg 0% 0%; --gray-one-hsl: 215deg 28% 17%; --gray-two-hsl: 217deg 19% 27%; --gray-three-hsl: 215deg 14% 34%; --gray-four-hsl: 220deg 9% 46%; --gray-five-hsl: 218deg 11% 65%; --gray-six-hsl: 216deg 12% 84%; --gray-seven-hsl: 220deg 14% 96%; --gray-category-hsl: 204deg 19% 95%; --gray-border-hsl: 213deg 15% 89%; --gray-price-hsl: 213deg 13% 59%; --white-hsl: 0deg 0% 100%; --input-foreground-hsl: 234deg 18% 69%; --input-bg-hsl: 233deg 30% 95%; --body-bg-hsl: 0deg 0% 88%; --bg-header-hsl: 266deg 66% 36%; } } body { background: hsl(var(--offwhite-hsl)); } .placeholder\:text-gray-400::-moz-placeholder { --tw-text-opacity: 1; color: hsl(var(--gray-four-hsl) / var(--tw-text-opacity)); } .placeholder\:text-gray-400::placeholder { --tw-text-opacity: 1; color: hsl(var(--gray-four-hsl) / var(--tw-text-opacity)); } .placeholder\:text-gray-price::-moz-placeholder { --tw-text-opacity: 1; color: hsl(var(--gray-price-hsl) / var(--tw-text-opacity)); } .placeholder\:text-gray-price::placeholder { --tw-text-opacity: 1; color: hsl(var(--gray-price-hsl) / var(--tw-text-opacity)); } .placeholder\:text-input-foreground::-moz-placeholder { --tw-text-opacity: 1; color: hsl(var(--input-foreground-hsl) / var(--tw-text-opacity)); } .placeholder\:text-input-foreground::placeholder { --tw-text-opacity: 1; color: hsl(var(--input-foreground-hsl) / var(--tw-text-opacity)); } .checked\:text-\[\#4ECDC4\]:checked { --tw-text-opacity: 1; color: rgb(78 205 196 / var(--tw-text-opacity)); } .hover\:cursor-pointer:hover { cursor: pointer; } .hover\:bg-gray-200:hover { --tw-bg-opacity: 1; background-color: hsl(var(--gray-six-hsl) / var(--tw-bg-opacity)); } .hover\:bg-orange-500:hover { --tw-bg-opacity: 1; background-color: rgb(249 115 22 / var(--tw-bg-opacity)); } .hover\:font-bold:hover { font-weight: 700; } .hover\:text-gray-900:hover { --tw-text-opacity: 1; color: rgb(17 24 39 / var(--tw-text-opacity)); } .hover\:underline:hover { text-decoration-line: underline; } .hover\:opacity-50:hover { opacity: 0.5; } .focus\:border-violet-700:focus { --tw-border-opacity: 1; border-color: rgb(109 40 217 / var(--tw-border-opacity)); } .focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; } .focus\:ring-0:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .disabled\:cursor-not-allowed:disabled { cursor: not-allowed; } .disabled\:opacity-50:disabled { opacity: 0.5; } @media (prefers-color-scheme: dark) { .dark\:border-gray-600 { --tw-border-opacity: 1; border-color: hsl(var(--gray-two-hsl) / var(--tw-border-opacity)); } .dark\:bg-blue-500 { --tw-bg-opacity: 1; background-color: rgb(59 130 246 / var(--tw-bg-opacity)); } .dark\:bg-gray-700 { --tw-bg-opacity: 1; background-color: hsl(var(--gray-one-hsl) / var(--tw-bg-opacity)); } .dark\:text-gray-400 { --tw-text-opacity: 1; color: hsl(var(--gray-four-hsl) / var(--tw-text-opacity)); } .dark\:text-gray-600 { --tw-text-opacity: 1; color: hsl(var(--gray-two-hsl) / var(--tw-text-opacity)); } .dark\:text-white { --tw-text-opacity: 1; color: hsl(var(--white-hsl) / var(--tw-text-opacity)); } .dark\:opacity-50 { opacity: 0.5; } .dark\:hover\:bg-gray-600:hover { --tw-bg-opacity: 1; background-color: hsl(var(--gray-two-hsl) / var(--tw-bg-opacity)); } .dark\:hover\:text-white:hover { --tw-text-opacity: 1; color: hsl(var(--white-hsl) / var(--tw-text-opacity)); } } @media not all and (min-width: 768px) { .max-md\:hidden { display: none; } .max-md\:text-base { font-size: 1rem; line-height: 1.5rem; } .max-md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; } .max-md\:text-xs { font-size: 0.75rem; line-height: 1rem; } } @media (min-width: 640px) { .sm\:col-span-4 { grid-column: span 4 / span 4; } .sm\:col-span-8 { grid-column: span 8 / span 8; } .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } } @media (min-width: 768px) { .md\:col-span-4 { grid-column: span 4 / span 4; } .md\:col-span-8 { grid-column: span 8 / span 8; } .md\:ml-96 { margin-left: 24rem; } .md\:block { display: block; } .md\:flex { display: flex; } .md\:grid { display: grid; } .md\:hidden { display: none; } .md\:w-full { width: 100%; } .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .md\:flex-row { flex-direction: row; } .md\:flex-col { flex-direction: column; } .md\:rounded-lg { border-radius: 0.5rem; } .md\:border-2 { border-width: 2px; } .md\:border-solid { border-style: solid; } .md\:pr-3 { padding-right: 0.75rem; } .md\:pr-32 { padding-right: 8rem; } .md\:pr-40 { padding-right: 10rem; } } @media (min-width: 1024px) { .lg\:col-span-2 { grid-column: span 2 / span 2; } .lg\:col-span-4 { grid-column: span 4 / span 4; } .lg\:col-span-8 { grid-column: span 8 / span 8; } .lg\:col-start-3 { grid-column-start: 3; } .lg\:col-start-5 { grid-column-start: 5; } .lg\:col-start-7 { grid-column-start: 7; } .lg\:ml-60 { margin-left: 15rem; } .lg\:w-1\/3 { width: 33.333333%; } .lg\:w-auto { width: auto; } .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .lg\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .lg\:justify-center { justify-content: center; } .lg\:px-48 { padding-left: 12rem; padding-right: 12rem; } } @media (min-width: 1280px) { .xl\:w-2\/3 { width: 66.666667%; } } @media (min-width: 1440px) { .\32xl\:order-1 { order: 1; } .\32xl\:order-2 { order: 2; } .\32xl\:col-span-2 { grid-column: span 2 / span 2; } .\32xl\:col-span-4 { grid-column: span 4 / span 4; } .\32xl\:col-span-8 { grid-column: span 8 / span 8; } .\32xl\:col-start-3 { grid-column-start: 3; } .\32xl\:col-start-5 { grid-column-start: 5; } .\32xl\:col-start-7 { grid-column-start: 7; } .\32xl\:mx-0 { margin-left: 0px; margin-right: 0px; } .\32xl\:mx-48 { margin-left: 12rem; margin-right: 12rem; } .\32xl\:mx-\[192px\] { margin-left: 192px; margin-right: 192px; } .\32xl\:ml-60 { margin-left: 15rem; } .\32xl\:mt-10 { margin-top: 2.5rem; } .\32xl\:mt-12 { margin-top: 3rem; } .\32xl\:mt-14 { margin-top: 3.5rem; } .\32xl\:block { display: block; } .\32xl\:inline-block { display: inline-block; } .\32xl\:flex { display: flex; } .\32xl\:grid { display: grid; } .\32xl\:hidden { display: none; } .\32xl\:h-\[460px\] { height: 460px; } .\32xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .\32xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .\32xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .\32xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .\32xl\:content-center { align-content: center; } .\32xl\:items-center { align-items: center; } .\32xl\:justify-start { justify-content: flex-start; } .\32xl\:justify-between { justify-content: space-between; } .\32xl\:justify-items-center { justify-items: center; } .\32xl\:justify-items-stretch { justify-items: stretch; } .\32xl\:gap-4 { gap: 1rem; } .\32xl\:space-x-14 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(3.5rem * var(--tw-space-x-reverse)); margin-left: calc(3.5rem * calc(1 - var(--tw-space-x-reverse))); } .\32xl\:space-y-0 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0px * var(--tw-space-y-reverse)); } .\32xl\:space-y-5 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); } .\32xl\:p-6 { padding: 1.5rem; } .\32xl\:px-4 { padding-left: 1rem; padding-right: 1rem; } .\32xl\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .\32xl\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .\32xl\:text-left { text-align: left; } .\32xl\:text-center { text-align: center; } .\32xl\:align-middle { vertical-align: middle; } .\32xl\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; } .\32xl\:text-\[16px\] { font-size: 16px; } .\32xl\:text-xl { font-size: 1.25rem; line-height: 1.75rem; } .\32xl\:font-medium { font-weight: 500; } } .\[\&\>\*\]\:bg-orange-700>* { --tw-bg-opacity: 1; background-color: rgb(194 65 12 / var(--tw-bg-opacity)); }
Parameter x-content-type-options
Solution Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.
If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.
-
-
-
Risk=Bajo, Confidence=Baja (1)
-
http://localhost:3000 (1)
-
Divulgación de la marca de hora - Unix (1)
GET http://localhost:3000/_next/static/chunks/main-app.js
Alert tags Alert description Una marca de tiempo ha sido divulgada por el servidor de la aplicación/el navegador - Unix
Other info 1451617521, que evalúa a: 2015-12-31 22:35:21
Request Request line and header section (293 bytes)
GET http://localhost:3000/_next/static/chunks/main-app.js HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache referer: http://localhost:3000/
Request body (0 bytes)
Response Status line and header section (316 bytes)
HTTP/1.1 200 OK cache-control: no-store, must-revalidate accept-ranges: bytes last-modified: Fri, 01 Dec 2023 22:57:26 GMT etag: W/"5d1e81-18c2799e5d0" content-type: application/javascript; charset=UTF-8 content-length: 6102657 vary: Accept-Encoding date: Fri, 01 Dec 2023 22:57:52 GMT connection: close
Response body (6102657 bytes)
/* * ATTENTION: An "eval-source-map" devtool has been used. * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["main-app"],{ /***/ "(app-client)/./node_modules/next/dist/build/polyfills/polyfill-module.js": /*!*******************************************************************!*\ !*** ./node_modules/next/dist/build/polyfills/polyfill-module.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { eval(__webpack_require__.ts("\"trimStart\"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),\"trimEnd\"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),\"description\"in Symbol.prototype||Object.defineProperty(Symbol.prototype,\"description\",{configurable:!0,get:function(){var t=/\\((.*)\\)/.exec(this.toString());return t?t[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(t,r){return r=this.concat.apply([],this),t>1&&r.some(Array.isArray)?r.flat(t-1):r},Array.prototype.flatMap=function(t,r){return this.map(t,r).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(t){if(\"function\"!=typeof t)return this.then(t,t);var r=this.constructor||Promise;return this.then(function(o){return r.resolve(t()).then(function(){return o})},function(o){return r.resolve(t()).then(function(){throw o})})}),Object.fromEntries||(Object.fromEntries=function(t){return Array.from(t).reduce(function(t,r){return t[r[0]]=r[1],t},{})});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9idWlsZC9wb2x5ZmlsbHMvcG9seWZpbGwtbW9kdWxlLmpzIiwibWFwcGluZ3MiOiJBQUFBLG1RQUFtUSwrQkFBK0IsdUNBQXVDLHNCQUFzQiw0REFBNEQsNkVBQTZFLHVDQUF1Qyw0QkFBNEIsb0VBQW9FLDhDQUE4QyxnQ0FBZ0MsNkJBQTZCLHNDQUFzQyxTQUFTLE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pe2lmKFwiZnVuY3Rpb25cIiE9dHlwZW9mIHQpcmV0dXJuIHRoaXMudGhlbih0LHQpO3ZhciByPXRoaXMuY29uc3RydWN0b3J8fFByb21pc2U7cmV0dXJuIHRoaXMudGhlbihmdW5jdGlvbihvKXtyZXR1cm4gci5yZXNvbHZlKHQoKSkudGhlbihmdW5jdGlvbigpe3JldHVybiBvfSl9LGZ1bmN0aW9uKG8pe3JldHVybiByLnJlc29sdmUodCgpKS50aGVuKGZ1bmN0aW9uKCl7dGhyb3cgb30pfSl9KSxPYmplY3QuZnJvbUVudHJpZXN8fChPYmplY3QuZnJvbUVudHJpZXM9ZnVuY3Rpb24odCl7cmV0dXJuIEFycmF5LmZyb20odCkucmVkdWNlKGZ1bmN0aW9uKHQscil7cmV0dXJuIHRbclswXV09clsxXSx0fSx7fSl9KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/build/polyfills/polyfill-module.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js": /*!********************************************************************************************!*\ !*** ./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js ***! \********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n/**\n * MIT License\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n// This file is copied from the Metro JavaScript bundler, with minor tweaks for\n// webpack 4 compatibility.\n//\n// https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js\nconst runtime_1 = __importDefault(__webpack_require__(/*! next/dist/compiled/react-refresh/runtime */ \"(app-client)/./node_modules/next/dist/compiled/react-refresh/runtime.js\"));\nfunction isSafeExport(key) {\n return (key === '__esModule' ||\n key === '__N_SSG' ||\n key === '__N_SSP' ||\n // TODO: remove this key from page config instead of allow listing it\n key === 'config');\n}\nfunction registerExportsForReactRefresh(moduleExports, moduleID) {\n runtime_1.default.register(moduleExports, moduleID + ' %exports%');\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return;\n }\n for (var key in moduleExports) {\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n var typeID = moduleID + ' %exports% ' + key;\n runtime_1.default.register(exportValue, typeID);\n }\n}\nfunction getRefreshBoundarySignature(moduleExports) {\n var signature = [];\n signature.push(runtime_1.default.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return signature;\n }\n for (var key in moduleExports) {\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n signature.push(key);\n signature.push(runtime_1.default.getFamilyByType(exportValue));\n }\n return signature;\n}\nfunction isReactRefreshBoundary(moduleExports) {\n if (runtime_1.default.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n return false;\n }\n var hasExports = false;\n var areAllExportsComponents = true;\n for (var key in moduleExports) {\n hasExports = true;\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n if (!runtime_1.default.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n}\nfunction shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {\n var prevSignature = getRefreshBoundarySignature(prevExports);\n var nextSignature = getRefreshBoundarySignature(nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (var i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n}\nvar isUpdateScheduled = false;\n// This function aggregates updates from multiple modules into a single React Refresh call.\nfunction scheduleUpdate() {\n if (isUpdateScheduled) {\n return;\n }\n isUpdateScheduled = true;\n function canApplyUpdate(status) {\n return status === 'idle';\n }\n function applyUpdate() {\n isUpdateScheduled = false;\n try {\n runtime_1.default.performReactRefresh();\n }\n catch (err) {\n console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\\n' +\n err);\n }\n }\n if (canApplyUpdate(module.hot.status())) {\n // Apply update on the next tick.\n Promise.resolve().then(() => {\n applyUpdate();\n });\n return;\n }\n const statusHandler = (status) => {\n if (canApplyUpdate(status)) {\n module.hot.removeStatusHandler(statusHandler);\n applyUpdate();\n }\n };\n // Apply update once the HMR runtime's status is idle.\n module.hot.addStatusHandler(statusHandler);\n}\n// Needs to be compatible with IE11\nexports[\"default\"] = {\n registerExportsForReactRefresh: registerExportsForReactRefresh,\n isReactRefreshBoundary: isReactRefreshBoundary,\n shouldInvalidateReactRefreshBoundary: shouldInvalidateReactRefreshBoundary,\n getRefreshBoundarySignature: getRefreshBoundarySignature,\n scheduleUpdate: scheduleUpdate,\n};\n//# sourceMappingURL=helpers.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9AbmV4dC9yZWFjdC1yZWZyZXNoLXV0aWxzL2Rpc3QvaW50ZXJuYWwvaGVscGVycy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDZDQUE2QztBQUM3QztBQUNBLDhDQUE2QyxFQUFFLGFBQWEsRUFBQztBQUM3RDtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtDQUFrQyxtQkFBTyxDQUFDLHlIQUEwQztBQUNwRjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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ycy5qcy5tYXAiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/add-base-path.js": /*!********************************************************!*\ !*** ./node_modules/next/dist/client/add-base-path.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"addBasePath\", ({\n enumerable: true,\n get: function() {\n return addBasePath;\n }\n}));\nconst _addpathprefix = __webpack_require__(/*! ../shared/lib/router/utils/add-path-prefix */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\");\nconst _normalizetrailingslash = __webpack_require__(/*! ./normalize-trailing-slash */ \"(app-client)/./node_modules/next/dist/client/normalize-trailing-slash.js\");\nconst basePath = false || \"\";\nfunction addBasePath(path, required) {\n return (0, _normalizetrailingslash.normalizePathTrailingSlash)( false ? 0 : (0, _addpathprefix.addPathPrefix)(path, basePath));\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=add-base-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYWRkLWJhc2UtcGF0aC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsK0NBQThDO0lBQzFDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQU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GV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hZGQtYmFzZS1wYXRoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJhZGRCYXNlUGF0aCIsIl9hZGRwYXRocHJlZml4IiwicmVxdWlyZSIsIl9ub3JtYWxpemV0cmFpbGluZ3NsYXNoIiwiYmFzZVBhdGgiLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX1JPVVRFUl9CQVNFUEFUSCIsInBhdGgiLCJyZXF1aXJlZCIsIm5vcm1hbGl6ZVBhdGhUcmFpbGluZ1NsYXNoIiwiX19ORVhUX01BTlVBTF9DTElFTlRfQkFTRV9QQVRIIiwiYWRkUGF0aFByZWZpeCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/add-base-path.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/app-bootstrap.js": /*!********************************************************!*\ !*** ./node_modules/next/dist/client/app-bootstrap.js ***! \********************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Before starting the Next.js runtime and requiring any module, we need to make\n * sure the following scripts are executed in the correct order:\n * - Polyfills\n * - next/script with `beforeInteractive` strategy\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"appBootstrap\", ({\n enumerable: true,\n get: function() {\n return appBootstrap;\n }\n}));\nconst version = \"13.4.9\";\nwindow.next = {\n version,\n appDir: true\n};\nfunction loadScriptsInSequence(scripts, hydrate) {\n if (!scripts || !scripts.length) {\n return hydrate();\n }\n return scripts.reduce((promise, param)=>{\n let [src, props] = param;\n return promise.then(()=>{\n return new Promise((resolve, reject)=>{\n const el = document.createElement(\"script\");\n if (props) {\n for(const key in props){\n if (key !== \"children\") {\n el.setAttribute(key, props[key]);\n }\n }\n }\n if (src) {\n el.src = src;\n el.onload = ()=>resolve();\n el.onerror = reject;\n } else if (props) {\n el.innerHTML = props.children;\n setTimeout(resolve);\n }\n document.head.appendChild(el);\n });\n });\n }, Promise.resolve()).catch((err)=>{\n console.error(err);\n // Still try to hydrate even if there's an error.\n }).then(()=>{\n hydrate();\n });\n}\nfunction appBootstrap(callback) {\n loadScriptsInSequence(self.__next_s, ()=>{\n callback();\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-bootstrap.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYXBwLWJvb3RzdHJhcC5qcyIsIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Q0FLQyxHQUFnQjtBQUNqQkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILGdEQUErQztJQUMzQ0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLFVBQVU7QUFDaEJDLE9BQU9DLElBQUksR0FBRztJQUNWRjtJQUNBRyxRQUFRO0FBQ1o7QUFDQSxTQUFTQyxzQkFBc0JDLE9BQU8sRUFBRUMsT0FBTztJQUMzQyxJQUFJLENBQUNELFdBQVcsQ0FBQ0EsUUFBUUUsTUFBTSxFQUFFO1FBQzdCLE9BQ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m9vdHN0cmFwO1xuICAgIH1cbn0pO1xuY29uc3QgdmVyc2lvbiA9IFwiMTMuNC45XCI7XG53aW5kb3cubmV4dCA9IHtcbiAgICB2ZXJzaW9uLFxuICAgIGFwcERpcjogdHJ1ZVxufTtcbmZ1bmN0aW9uIGxvYWRTY3JpcHRzSW5TZXF1ZW5jZShzY3JpcHRzLCBoeWRyYXRlKSB7XG4gICAgaWYgKCFzY3JpcHRzIHx8ICFzY3JpcHRzLmxlbmd0aCkge1xuICAgICAgICByZXR1cm4gaHlkcmF0ZSgpO1xuICAgIH1cbiAgICByZXR1cm4gc2NyaXB0cy5yZWR1Y2UoKHByb21pc2UsIHBhcmFtKT0+e1xuICAgICAgICBsZXQgW3NyYywgcHJvcHNdID0gcGFyYW07XG4gICAgICAgIHJldHVybiBwcm9taXNlLnRoZW4oKCk9PntcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KT0+e1xuICAgICAgICAgICAgICAgIGNvbnN0IGVsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInNjcmlwdFwiKTtcbiAgICAgICAgICAgICAgICBpZiAocHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yKGNvbnN0IGtleSBpbiBwcm9wcyl7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ICE9PSBcImNoaWxkcmVuXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoa2V5LCBwcm9wc1trZXldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3JjKSB7XG4gICAgICAgICAgICAgICAgICAgIGVsLnNyYyA9IHNyYztcbiAgICAgICAgICAgICAgICAgICAgZWwub25sb2FkID0gKCk9PnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAg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IG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hcHAtYm9vdHN0cmFwLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJhcHBCb290c3RyYXAiLCJ2ZXJzaW9uIiwid2luZG93IiwibmV4dCIsImFwcERpciIsImxvYWRTY3JpcHRzSW5TZXF1ZW5jZSIsInNjcmlwdHMiLCJoeWRyYXRlIiwibGVuZ3RoIiwicmVkdWNlIiwicHJvbWlzZSIsInBhcmFtIiwic3JjIiwicHJvcHMiLCJ0aGVuIiwiUHJvbWlzZSIsInJlc29sdmUiLCJyZWplY3QiLCJlbCIsImRvY3VtZW50IiwiY3JlYXRlRWxlbWVudCIsImtleSIsInNldEF0dHJpYnV0ZSIsIm9ubG9hZCIsIm9uZXJyb3IiLCJpbm5lckhUTUwiLCJjaGlsZHJlbiIsInNldFRpbWVvdXQiLCJoZWFkIiwiYXBwZW5kQ2hpbGQiLCJjYXRjaCIsImVyciIsImNvbnNvbGUiLCJlcnJvciIsImNhbGxiYWNrIiwic2VsZiIsIl9fbmV4dF9zIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/app-bootstrap.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/app-call-server.js": /*!**********************************************************!*\ !*** ./node_modules/next/dist/client/app-call-server.js ***! \**********************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"callServer\", ({\n enumerable: true,\n get: function() {\n return callServer;\n }\n}));\nconst _approuter = __webpack_require__(/*! ./components/app-router */ \"(app-client)/./node_modules/next/dist/client/components/app-router.js\");\nasync function callServer(actionId, actionArgs) {\n const actionDispatcher = (0, _approuter.getServerActionDispatcher)();\n if (!actionDispatcher) {\n throw new Error(\"Invariant: missing action dispatcher.\");\n }\n return new Promise((resolve, reject)=>{\n actionDispatcher({\n actionId,\n actionArgs,\n resolve,\n reject\n });\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-call-server.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYXBwLWNhbGwtc2VydmVyLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw4Q0FBNkM7SUFDekNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyxhQUFhQyxtQkFBT0EsQ0FBQyxzR0FBeUI7QUFDcEQsZUFBZUYsV0FBV0csUUFBUSxFQUFFQyxVQUFVO0lBQzFDLE1BQU1DLG1CQUFtQixDQUFDLEdBQUdKLFdBQVdLLHlCQUF5QjtJQUNqRSxJQUFJLENBQUNELGtCQUFrQjtRQUNuQixNQUFNLElBQUlFLE1BQU07SUFDcEI7SUFDQSxPQUFPLElBQUlDLFFBQVEsQ0FBQ0MsU0FBU0M7UUFDekJMLGlCQUFpQjtZQUNiRjtZQUNBQztZQUNBSztZQUNBQztRQUNKO0lBQ0o7QUFDSjtBQUVBLElBQUksQ0FBQyxPQUFPZCxRQUFRZSxPQUFPLEtBQUssY0FBZSxPQUFPZixRQUFR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m9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/app-call-server.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/app-index.js": /*!****************************************************!*\ !*** ./node_modules/next/dist/client/app-index.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* global location */ \nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"hydrate\", ({\n enumerable: true,\n get: function() {\n return hydrate;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\n__webpack_require__(/*! ../build/polyfills/polyfill-module */ \"(app-client)/./node_modules/next/dist/build/polyfills/polyfill-module.js\");\nconst _client = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react-dom/client */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/client.js\"));\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _client1 = __webpack_require__(/*! react-server-dom-webpack/client */ \"(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.js\");\nconst _headmanagercontext = __webpack_require__(/*! ../shared/lib/head-manager-context */ \"(app-client)/./node_modules/next/dist/shared/lib/head-manager-context.js\");\nconst _approutercontext = __webpack_require__(/*! ../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _onrecoverableerror = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! ./on-recoverable-error */ \"(app-client)/./node_modules/next/dist/client/on-recoverable-error.js\"));\nconst _appcallserver = __webpack_require__(/*! ./app-call-server */ \"(app-client)/./node_modules/next/dist/client/app-call-server.js\");\nconst _isnextroutererror = __webpack_require__(/*! ./components/is-next-router-error */ \"(app-client)/./node_modules/next/dist/client/components/is-next-router-error.js\");\n// Since React doesn't call onerror for errors caught in error boundaries.\nconst origConsoleError = window.console.error;\nwindow.console.error = function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n if ((0, _isnextroutererror.isNextRouterError)(args[0])) {\n return;\n }\n origConsoleError.apply(window.console, args);\n};\nwindow.addEventListener(\"error\", (ev)=>{\n if ((0, _isnextroutererror.isNextRouterError)(ev.error)) {\n ev.preventDefault();\n return;\n }\n});\nconst addChunkSuffix = (getOriginalChunk)=>(chunkId)=>{\n return getOriginalChunk(chunkId) + (\"\" + ( false ? 0 : \"\"));\n };\n// eslint-disable-next-line no-undef\nconst getChunkScriptFilename = __webpack_require__.u;\nconst chunkFilenameMap = {};\n// eslint-disable-next-line no-undef\n__webpack_require__.u = addChunkSuffix((chunkId)=>encodeURI(chunkFilenameMap[chunkId] || getChunkScriptFilename(chunkId)));\n// eslint-disable-next-line no-undef\nconst getChunkCssFilename = __webpack_require__.k;\n// eslint-disable-next-line no-undef\n__webpack_require__.k = addChunkSuffix(getChunkCssFilename);\n// eslint-disable-next-line no-undef\nconst getMiniCssFilename = __webpack_require__.miniCssF;\n// eslint-disable-next-line no-undef\n__webpack_require__.miniCssF = addChunkSuffix(getMiniCssFilename);\n// Ignore the module ID transform in client.\n// eslint-disable-next-line no-undef\n// @ts-expect-error TODO: fix type\nself.__next_require__ = true ? (id)=>{\n const mod = __webpack_require__(id);\n if (typeof mod === \"object\") {\n // Return a proxy to flight client to make sure it's always getting\n // the latest module, instead of being cached.\n return new Proxy(mod, {\n get (_target, prop) {\n return __webpack_require__(id)[prop];\n }\n });\n }\n return mod;\n} : 0;\nself.__next_chunk_load__ = (chunk)=>{\n if (!chunk) return Promise.resolve();\n const [chunkId, chunkFilePath] = chunk.split(\":\");\n chunkFilenameMap[chunkId] = chunkFilePath;\n // @ts-ignore\n // eslint-disable-next-line no-undef\n return __webpack_require__.e(chunkId);\n};\nconst appElement = document;\nconst getCacheKey = ()=>{\n const { pathname, search } = location;\n return pathname + search;\n};\nconst encoder = new TextEncoder();\nlet initialServerDataBuffer = undefined;\nlet initialServerDataWriter = undefined;\nlet initialServerDataLoaded = false;\nlet initialServerDataFlushed = false;\nfunction nextServerDataCallback(seg) {\n if (seg[0] === 0) {\n initialServerDataBuffer = [];\n } else {\n if (!initialServerDataBuffer) throw new Error(\"Unexpected server data: missing bootstrap script.\");\n if (initialServerDataWriter) {\n initialServerDataWriter.enqueue(encoder.encode(seg[1]));\n } else {\n initialServerDataBuffer.push(seg[1]);\n }\n }\n}\n// There might be race conditions between `nextServerDataRegisterWriter` and\n// `DOMContentLoaded`. The former will be called when React starts to hydrate\n// the root, the latter will be called when the DOM is fully loaded.\n// For streaming, the former is called first due to partial hydration.\n// For non-streaming, the latter can be called first.\n// Hence, we use two variables `initialServerDataLoaded` and\n// `initialServerDataFlushed` to make sure the writer will be closed and\n// `initialServerDataBuffer` will be cleared in the right time.\nfunction nextServerDataRegisterWriter(ctr) {\n if (initialServerDataBuffer) {\n initialServerDataBuffer.forEach((val)=>{\n ctr.enqueue(encoder.encode(val));\n });\n if (initialServerDataLoaded && !initialServerDataFlushed) {\n ctr.close();\n initialServerDataFlushed = true;\n initialServerDataBuffer = undefined;\n }\n }\n initialServerDataWriter = ctr;\n}\n// When `DOMContentLoaded`, we can close all pending writers to finish hydration.\nconst DOMContentLoaded = function() {\n if (initialServerDataWriter && !initialServerDataFlushed) {\n initialServerDataWriter.close();\n initialServerDataFlushed = true;\n initialServerDataBuffer = undefined;\n }\n initialServerDataLoaded = true;\n};\n_c = DOMContentLoaded;\n// It's possible that the DOM is already loaded.\nif (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", DOMContentLoaded, false);\n} else {\n DOMContentLoaded();\n}\nconst nextServerDataLoadingGlobal = self.__next_f = self.__next_f || [];\nnextServerDataLoadingGlobal.forEach(nextServerDataCallback);\nnextServerDataLoadingGlobal.push = nextServerDataCallback;\nfunction createResponseCache() {\n return new Map();\n}\nconst rscCache = createResponseCache();\nfunction useInitialServerResponse(cacheKey) {\n const response = rscCache.get(cacheKey);\n if (response) return response;\n const readable = new ReadableStream({\n start (controller) {\n nextServerDataRegisterWriter(controller);\n }\n });\n const newResponse = (0, _client1.createFromReadableStream)(readable, {\n callServer: _appcallserver.callServer\n });\n rscCache.set(cacheKey, newResponse);\n return newResponse;\n}\nfunction ServerRoot(param) {\n _s();\n let { cacheKey } = param;\n _react.default.useEffect(()=>{\n rscCache.delete(cacheKey);\n });\n const response = useInitialServerResponse(cacheKey);\n const root = (0, _react.use)(response);\n return root;\n}\n_s(ServerRoot, \"K9b7qXb5/x90+1mcPl2lLLR5/0A=\", false, function() {\n return [\n useInitialServerResponse\n ];\n});\n_c1 = ServerRoot;\nconst StrictModeIfEnabled = false ? 0 : _react.default.Fragment;\nfunction Root(param) {\n let { children } = param;\n if (false) {}\n if (false) {}\n return children;\n}\n_c2 = Root;\nfunction RSCComponent(props) {\n return /*#__PURE__*/ _react.default.createElement(ServerRoot, {\n ...props,\n cacheKey: getCacheKey()\n });\n}\n_c3 = RSCComponent;\nfunction hydrate() {\n if (true) {\n const rootLayoutMissingTagsError = self.__next_root_layout_missing_tags_error;\n const HotReload = (__webpack_require__(/*! ./components/react-dev-overlay/hot-reloader-client */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js\")[\"default\"]);\n // Don't try to hydrate if root layout is missing required tags, render error instead\n if (rootLayoutMissingTagsError) {\n const reactRootElement = document.createElement(\"div\");\n document.body.appendChild(reactRootElement);\n const reactRoot = _client.default.createRoot(reactRootElement, {\n onRecoverableError: _onrecoverableerror.default\n });\n reactRoot.render(/*#__PURE__*/ _react.default.createElement(_approutercontext.GlobalLayoutRouterContext.Provider, {\n value: {\n buildId: \"development\",\n tree: rootLayoutMissingTagsError.tree,\n changeByServerResponse: ()=>{},\n focusAndScrollRef: {\n apply: false,\n hashFragment: null,\n segmentPaths: []\n },\n nextUrl: null\n }\n }, /*#__PURE__*/ _react.default.createElement(HotReload, {\n assetPrefix: rootLayoutMissingTagsError.assetPrefix\n })));\n return;\n }\n }\n const reactEl = /*#__PURE__*/ _react.default.createElement(StrictModeIfEnabled, null, /*#__PURE__*/ _react.default.createElement(_headmanagercontext.HeadManagerContext.Provider, {\n value: {\n appDir: true\n }\n }, /*#__PURE__*/ _react.default.createElement(Root, null, /*#__PURE__*/ _react.default.createElement(RSCComponent, null))));\n const options = {\n onRecoverableError: _onrecoverableerror.default\n };\n const isError = document.documentElement.id === \"__next_error__\";\n if (true) {\n // Patch console.error to collect information about hydration errors\n const patchConsoleError = (__webpack_require__(/*! ./components/react-dev-overlay/internal/helpers/hydration-error-info */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js\").patchConsoleError);\n if (!isError) {\n patchConsoleError();\n }\n }\n if (isError) {\n _client.default.createRoot(appElement, options).render(reactEl);\n } else {\n _react.default.startTransition(()=>_client.default.hydrateRoot(appElement, reactEl, options));\n }\n // TODO-APP: Remove this logic when Float has GC built-in in development.\n if (true) {\n const { linkGc } = __webpack_require__(/*! ./app-link-gc */ \"(app-client)/./node_modules/next/dist/client/app-link-gc.js\");\n linkGc();\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-index.js.map\nvar _c, _c1, _c2, _c3;\n$RefreshReg$(_c, \"DOMContentLoaded\");\n$RefreshReg$(_c1, \"ServerRoot\");\n$RefreshReg$(_c2, \"Root\");\n$RefreshReg$(_c3, \"RSCComponent\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYXBwLWluZGV4LmpzIiwibWFwcGluZ3MiOiJBQUFBLG1CQUFtQixHQUFnQjs7QUFDbkNBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCwyQ0FBMEM7SUFDdENJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQywyQkFBMkJDLG1CQUFPQSxDQUFDLHlIQUF5QztBQUNsRixNQUFNQyw0QkFBNEJELG1CQUFPQSxDQUFDLDJIQUEwQztBQUNwRkEsbUJBQU9BLENBQUMsb0hBQW9DO0FBQzVDLE1BQU1FLFVBQVUsV0FBVyxHQUFHSCx5QkFBeUJJLENBQUMsQ0FBQ0gsbUJBQU9BLENBQUMsNEZBQWtCO0FBQ25GLE1BQU1JLFNBQVMsV0FBVyxHQUFHSCwwQkFBMEJFLENBQUMsQ0FBQ0gsbUJBQU9BLENBQUMsNEVBQU87QUFDeEUsTUFBTUssV0FBV0wsbUJBQU9BLENBQUMsMEhBQWlDO0FBQzFELE1BQU1NLHNCQUFzQk4sbUJBQU9BLENBQUMsb0hBQW9DO0FBQ3hFLE1BQU1PLG9CQUFvQlAsbUJBQU9BLENBQUMsZ0hBQWtDO0FBQ3BFLE1BQU1RLHNCQUFzQixXQUFXLEdBQUdULHlCQUF5QkksQ0FBQyxDQUFDSCxtQkFBT0EsQ0FBQyxvR0FBd0I7QUFDckcsTUFBTVMsaUJBQWlCVCxtQkFBT0EsQ0FBQywwRkFBbUI7QUFDbEQsTUFBTVUscUJBQXFCVixtQkFBT0EsQ0FBQywwSEFBbUM7QUFDdEUsMEVBQTBFO0FBQz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AgIGlmIChyb290TGF5b3V0TWlzc2luZ1RhZ3NFcnJvcikge1xuICAgICAgICAgICAgY29uc3QgcmVhY3RSb290RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHJlYWN0Um9vdEVsZW1lbnQpO1xuICAgICAgICAgICAgY29uc3QgcmVhY3RSb290ID0gX2NsaWVudC5kZWZhdWx0LmNyZWF0ZVJvb3QocmVhY3RSb290RWxlbWVudCwge1xuICAgICAgICAgICAgICAgIG9uUmVjb3ZlcmFibGVFcnJvcjogX29ucmVjb3ZlcmFibGVlcnJvci5kZWZhdWx0XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJlYWN0Um9vdC5yZW5kZXIoLyojX19QVVJFX18qLyBfcmVhY3QuZGVmYXVsdC5jcmVhdGVFbGVtZW50KF9hcHByb3V0ZXJjb250ZXh0Lkdsb2JhbExheW91dFJvdXRlckNvbnRleHQuUHJvdmlkZXIsIHtcbiAgICAgICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICAgICAgICBidWlsZElkOiBcImRldmVsb3BtZW50XCIsXG4gICAgICAgICAgICAgICAgICAgIHRyZWU6IHJvb3RMYXlvdXRNaXNzaW5nVGFnc0Vycm9yLnRyZWUsXG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZUJ5U2VydmVyUmVzcG9uc2U6ICgpPT57fSxcbiAgICAgICAgICAgICAgICAgICAgZm9jdXNBbmRTY3JvbGxSZWY6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5OiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhc2hGcmFnbWVudDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlZ21lbnRQYXRoczogW11cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbmV4dFVybDogbnVsbF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iaHlkcmF0ZVJvb3QiLCJsaW5rR2MiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/app-index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/app-link-gc.js": /*!******************************************************!*\ !*** ./node_modules/next/dist/client/app-link-gc.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"linkGc\", ({\n enumerable: true,\n get: function() {\n return linkGc;\n }\n}));\nfunction linkGc() {\n // TODO-APP: Remove this logic when Float has GC built-in in development.\n if (true) {\n const callback = (mutationList)=>{\n for (const mutation of mutationList){\n if (mutation.type === \"childList\") {\n for (const node of mutation.addedNodes){\n if (\"tagName\" in node && node.tagName === \"LINK\") {\n var _link_dataset_precedence;\n const link = node;\n if ((_link_dataset_precedence = link.dataset.precedence) == null ? void 0 : _link_dataset_precedence.startsWith(\"next\")) {\n const href = link.getAttribute(\"href\");\n if (href) {\n const [resource, version] = href.split(\"?v=\");\n if (version) {\n const currentOrigin = window.location.origin;\n const allLinks = [\n ...document.querySelectorAll('link[href^=\"' + resource + '\"]'),\n // It's possible that the resource is a full URL or only pathname,\n // so we need to remove the alternative href as well.\n ...document.querySelectorAll('link[href^=\"' + (resource.startsWith(currentOrigin) ? resource.slice(currentOrigin.length) : currentOrigin + resource) + '\"]')\n ];\n for (const otherLink of allLinks){\n var _otherLink_dataset_precedence;\n if ((_otherLink_dataset_precedence = otherLink.dataset.precedence) == null ? void 0 : _otherLink_dataset_precedence.startsWith(\"next\")) {\n const otherHref = otherLink.getAttribute(\"href\");\n if (otherHref) {\n const [, otherVersion] = otherHref.split(\"?v=\");\n if (!otherVersion || +otherVersion < +version) {\n // Delay the removal of the stylesheet to avoid FOUC\n // caused by `@font-face` rules, as they seem to be\n // a couple of ticks delayed between the old and new\n // styles being swapped even if the font is cached.\n setTimeout(()=>{\n otherLink.remove();\n }, 5);\n const preloadLink = document.querySelector('link[rel=\"preload\"][as=\"style\"][href=\"' + otherHref + '\"]');\n if (preloadLink) {\n preloadLink.remove();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n };\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver(callback);\n observer.observe(document.head, {\n childList: true\n });\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-link-gc.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYXBwLWxpbmstZ2MuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDBDQUF5QztJQUNyQ0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLFNBQVNBO0lBQ0wseUVBQXlFO0lBQ3pFLElBQUlDLElBQXFDLEVBQUU7UUFDdkMsTUFBTUMsV0FBVyxDQUFDQztZQUNkLEtBQUssTUFBTUMsWUFBWUQsYUFBYTtnQkFDaEMsSUFBSUMsU0FBU0MsSUFBSSxLQUFLLGFBQWE7b0JBQy9CLEtBQUssTUFBTUMsUUFBUUYsU0FBU0csVUFBVSxDQUFDO3dCQUNuQyxJQUFJLGFBQWFELFFBQVFBLEtBQUtFLE9BQU8sS0FBSyxRQUFROzRCQUM5QyxJQUFJQzs0QkFDSixNQUFNQyxPQUFPSjs0QkFDYixJQUFJLENBQUNHLDJCQ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CJuZXh0XCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGhyZWYgPSBsaW5rLmdldEF0dHJpYnV0ZShcImhyZWZcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChocmVmKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBbcmVzb3VyY2UsIHZlcnNpb25dID0gaHJlZi5zcGxpdChcIj92PVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ZXJzaW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudE9yaWdpbiA9IHdpbmRvdy5sb2NhdGlvbi5vcmlnaW47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYWxsTGlua3MgPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ2xpbmtbaHJlZl49XCInICsgcmVzb3VyY2UgKyAnXCJdJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEl0J3MgcG9zc2libGUgdGhhdCB0aGUgcmVzb3VyY2UgaXMgYSBmdWxsIFVSTCBvciBvbmx5IHBhdGhuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzbyB3ZSBuZWVkIHRvIHJlbW92ZSB0aGUgYWx0ZXJuYXRpdmUgaHJlZiBhcyB3ZWxsLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5kb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCdsaW5rW2hyZWZePVwiJyArIChyZXNvdXJjZS5zdGFydHNXaXRoKGN1cnJlbnRPcmlnaW4pID8gcmVzb3VyY2Uuc2xpY2UoY3VycmVudE9yaWdpbi5sZW5ndGgpIDogY3VycmVudE9yaWdpbiArIHJlc291cmNlKSArICdcIl0nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBvdGhlckxpbmsgb2YgYWxsTGlua3Mpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgX290aGVyTGlua19kYXRhc2V0X3ByZWNlZGVuY2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoX290aGVyTGlua19kYXRhc2V0X3ByZWNlZGVuY2UgPSBvdGhlckxpbmsuZGF0YXNldC5wcmVjZWRlbmNlKSA9PSBudWxsID8gdm9pZCAwIDogX290aGVyTGlua19kYXRhc2V0X3ByZWNlZGVuY2Uuc3RhcnRzV2l0aChcIm5leHRcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG90aGVySHJlZiA9IG90aGVyTGluay5nZXRBdHRyaWJ1dGUoXCJocmVmXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG90aGVySHJlZikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFssIG90aGVyVmVyc2lvbl0gPSBvdGhlckhyZWYuc3BsaXQoXCI/dj1cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFvdGhlclZlcnNpb24gfHwgK290aGVyVmVyc2lvbiA8ICt2ZXJzaW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIERlbGF5IHRoZSByZW1vdmFsIG9mIHRoZSBzdHlsZXNoZWV0IHRvIGF2b2lkIEZPVUNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2F1c2VkIGJ5IGBAZm9udC1mYWNlYCBydWxlcywgYXMgdGhleSBzZWVtIHRvIGJlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGEgY291cGxlIG9mIHRpY2tzIGRlbGF5ZWQgYmV0d2VlbiB0aGUgb2xkIGFuZCBuZXdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc3R5bGVzIGJlaW5nIHN3YXBwZWQgZXZlbiBpZiB0aGUgZm9udCBpcyBjYWNoZWQuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVyTGluay5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgNSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZWxvYWRMaW5rID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignbGlua1tyZWw9XCJwcmVsb2FkXCJdW2FzPVwic3R5bGVcIl1baHJlZj1cIicgKyBvdGhlckhyZWYgKyAnXCJdJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmVsb2FkTGluaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlbG9hZExpbmsucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8vIENyZWF0ZSBhbiBvYnNlcnZlciBpbnN0YW5jZSBsaW5rZWQgdG8gdGhlIGNhbGxiYWNrIGZ1bmN0aW9uXG4gICAgICAgIGNvbnN0IG9ic2VydmVyID0gbmV3IE11dGF0aW9uT2JzZXJ2ZXIoY2FsbGJhY2spO1xuICAgICAgICBvYnNlcnZlci5vYnNlcnZlKGRvY3VtZW50LmhlYWQsIHtcbiAgICAgICAgICAgIGNoaWxkTGlzdDogdHJ1ZVxuICAgICAgICB9KTtcbiAgICB9XG59XG5cbmlmICgodHlwZW9mIGV4cG9ydHMuZGVmYXVsdCA9PT0gJ2Z1bmN0aW9uJyB8fCAodHlwZW9mIGV4cG9ydHMuZGVmYXVsdCA9PT0gJ29iamVjdCcgJiYgZXhwb3J0cy5kZWZhdWx0ICE9PSBudWxsKSkgJiYgdHlwZW9mIGV4cG9ydHMuZGVmYXVsdC5fX2VzTW9kdWxlID09PSAndW5kZWZpbmVkJykge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIH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.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/app-next-dev.js": /*!*******************************************************!*\ !*** ./node_modules/next/dist/client/app-next-dev.js ***! \*******************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// TODO-APP: hydration warning\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nconst _appbootstrap = __webpack_require__(/*! ./app-bootstrap */ \"(app-client)/./node_modules/next/dist/client/app-bootstrap.js\");\n(0, _appbootstrap.appBootstrap)(()=>{\n const { hydrate } = __webpack_require__(/*! ./app-index */ \"(app-client)/./node_modules/next/dist/client/app-index.js\");\n hydrate();\n}) // TODO-APP: build indicator\n;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-next-dev.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYXBwLW5leHQtZGV2LmpzIiwibWFwcGluZ3MiOiJBQUFBLDhCQUE4QjtBQUNqQjtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixNQUFNQyxnQkFBZ0JDLG1CQUFPQSxDQUFDLHNGQUFpQjtBQUM5QyxJQUFHRCxjQUFjRSxZQUFZLEVBQUU7SUFDNUIsTUFBTSxFQUFFQyxPQUFPLEVBQUcsR0FBR0YsbUJBQU9BLENBQUMsOEVBQWE7SUFDMUNFO0FBQ0osR0FBRyw0QkFBNEI7O0FBRy9CLElBQUksQ0FBQyxPQUFPTCxRQUFRTSxPQUFPLEtBQUssY0FBZSxPQUFPTixRQUFRTSxPQUFPLEtBQUssWUFBWU4sUUFBUU0sT0FBTyxLQUFLLElB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Y3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFwcC1uZXh0LWRldi5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJfYXBwYm9vdHN0cmFwIiwicmVxdWlyZSIsImFwcEJvb3RzdHJhcCIsImh5ZHJhdGUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/app-next-dev.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/app-router-announcer.js": /*!**************************************************************************!*\ !*** ./node_modules/next/dist/client/components/app-router-announcer.js ***! \**************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"AppRouterAnnouncer\", ({\n enumerable: true,\n get: function() {\n return AppRouterAnnouncer;\n }\n}));\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nconst _reactdom = __webpack_require__(/*! react-dom */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/index.js\");\nconst ANNOUNCER_TYPE = \"next-route-announcer\";\nconst ANNOUNCER_ID = \"__next-route-announcer__\";\nfunction getAnnouncerNode() {\n var _existingAnnouncer_shadowRoot;\n const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0];\n if (existingAnnouncer == null ? void 0 : (_existingAnnouncer_shadowRoot = existingAnnouncer.shadowRoot) == null ? void 0 : _existingAnnouncer_shadowRoot.childNodes[0]) {\n return existingAnnouncer.shadowRoot.childNodes[0];\n } else {\n const container = document.createElement(ANNOUNCER_TYPE);\n container.style.cssText = \"position:absolute\";\n const announcer = document.createElement(\"div\");\n announcer.ariaLive = \"assertive\";\n announcer.id = ANNOUNCER_ID;\n announcer.role = \"alert\";\n announcer.style.cssText = \"position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal\";\n // Use shadow DOM here to avoid any potential CSS bleed\n const shadow = container.attachShadow({\n mode: \"open\"\n });\n shadow.appendChild(announcer);\n document.body.appendChild(container);\n return announcer;\n }\n}\nfunction AppRouterAnnouncer(param) {\n let { tree } = param;\n const [portalNode, setPortalNode] = (0, _react.useState)(null);\n (0, _react.useEffect)(()=>{\n const announcer = getAnnouncerNode();\n setPortalNode(announcer);\n return ()=>{\n const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0];\n if (container == null ? void 0 : container.isConnected) {\n document.body.removeChild(container);\n }\n };\n }, []);\n const [routeAnnouncement, setRouteAnnouncement] = (0, _react.useState)(\"\");\n const previousTitle = (0, _react.useRef)();\n (0, _react.useEffect)(()=>{\n let currentTitle = \"\";\n if (document.title) {\n currentTitle = document.title;\n } else {\n const pageHeader = document.querySelector(\"h1\");\n if (pageHeader) {\n currentTitle = pageHeader.innerText || pageHeader.textContent || \"\";\n }\n }\n // Only announce the title change, but not for the first load because screen\n // readers do that automatically.\n if (previousTitle.current !== undefined) {\n setRouteAnnouncement(currentTitle);\n }\n previousTitle.current = currentTitle;\n }, [\n tree\n ]);\n return portalNode ? /*#__PURE__*/ (0, _reactdom.createPortal)(routeAnnouncement, portalNode) : null;\n}\n_c = AppRouterAnnouncer;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-router-announcer.js.map\nvar _c;\n$RefreshReg$(_c, \"AppRouterAnnouncer\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9hcHAtcm91dGVyLWFubm91bmNlci5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsU0FBU0MsbUJBQU9BLENBQUMsNEVBQU87QUFDOUIsTUFBTUMsWUFBWUQsbUJBQU9BLENBQUMsb0ZBQVc7QUFDckMsTUFBTUUsaUJBQWlCO0FBQ3ZCLE1BQU1DLGVBQWU7QUFDckIsU0FBU0M7SUFDTCxJQUFJQztJQUNKLE1BQU1DLG9CQUFvQkMsU0FBU0MsaUJBQWlCLENBQUNOLGVBQWUsQ0FBQyxFQUFFO0lBQ3ZFLElBQUlJLHFCQUFxQixPQUFPLEtBQUssSUFBSSxDQUFDRCxnQ0FBZ0NDLGtCQUFrQkcsVUFBVSxLQUFLLE9BQU8sS0FBSyxJQUFJSiw4QkFBOEJLLFVBQVUsQ0FBQyxFQUFFLEVBQUU7UUFDcEssT0FBT0osa0JBQWtCRyxVQUFVLENBQUNDLFVBQVUsQ0FBQyxFQUFFO0lBQ3JELE9BQU87UUFDSCxNQUFNQyxZQUFZSixTQUFTSyxhQUFhLENBQUNWO1FBQ3pDUyxVQUFVRSxLQUFLLENBQUNDLE9BQU8sR0FBRztRQUMxQixNQUFNQyxZQUFZUixTQUFTSyxhQUFhLENBQUM7UUFDekNHLFVBQVVDLFF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VmaW5lZCIsImNyZWF0ZVBvcnRhbCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/app-router-announcer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/app-router-headers.js": /*!************************************************************************!*\ !*** ./node_modules/next/dist/client/components/app-router-headers.js ***! \************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n RSC: function() {\n return RSC;\n },\n ACTION: function() {\n return ACTION;\n },\n NEXT_ROUTER_STATE_TREE: function() {\n return NEXT_ROUTER_STATE_TREE;\n },\n NEXT_ROUTER_PREFETCH: function() {\n return NEXT_ROUTER_PREFETCH;\n },\n NEXT_URL: function() {\n return NEXT_URL;\n },\n FETCH_CACHE_HEADER: function() {\n return FETCH_CACHE_HEADER;\n },\n RSC_CONTENT_TYPE_HEADER: function() {\n return RSC_CONTENT_TYPE_HEADER;\n },\n RSC_VARY_HEADER: function() {\n return RSC_VARY_HEADER;\n },\n FLIGHT_PARAMETERS: function() {\n return FLIGHT_PARAMETERS;\n },\n NEXT_RSC_UNION_QUERY: function() {\n return NEXT_RSC_UNION_QUERY;\n }\n});\nconst RSC = \"RSC\";\nconst ACTION = \"Next-Action\";\nconst NEXT_ROUTER_STATE_TREE = \"Next-Router-State-Tree\";\nconst NEXT_ROUTER_PREFETCH = \"Next-Router-Prefetch\";\nconst NEXT_URL = \"Next-Url\";\nconst FETCH_CACHE_HEADER = \"x-vercel-sc-headers\";\nconst RSC_CONTENT_TYPE_HEADER = \"text/x-component\";\nconst RSC_VARY_HEADER = RSC + \", \" + NEXT_ROUTER_STATE_TREE + \", \" + NEXT_ROUTER_PREFETCH;\nconst FLIGHT_PARAMETERS = [\n [\n RSC\n ],\n [\n NEXT_ROUTER_STATE_TREE\n ],\n [\n NEXT_ROUTER_PREFETCH\n ]\n];\nconst NEXT_RSC_UNION_QUERY = \"_rsc\";\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-router-headers.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9hcHAtcm91dGVyLWhlYWRlcnMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FXTjtBQUNBLFNBQVNXLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlqQixPQUFPQyxjQUFjLENBQUNlLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUWIsU0FBUztJQUNiRyxLQUFLO1FBQ0QsT0FBT0E7SUFDWDtJQUNBQyxRQUFRO1FBQ0osT0FBT0E7SUFDWDtJQUNBQyx3QkFBd0I7UUFDcEIsT0FBT0E7SUFDWDtJQUNBQyxzQkFBc0I7UUFDbEIsT0FBT0E7SUFDWDtJQUNBQyxVQUFVO1FBQ04sT0FBT0E7SUFDWDtJQUNBQyxvQkFBb0I7UUFDaEIsT0FBT0E7SUFDWDtJQUNBQyx5QkFBeUI7UUFDckIsT0FBT0E7SUFDWDtJQUNBQy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5FWFRfVVJMIiwiRkVUQ0hfQ0FDSEVfSEVBREVSIiwiUlNDX0NPTlRFTlRfVFlQRV9IRUFERVIiLCJSU0NfVkFSWV9IRUFERVIiLCJGTElHSFRfUEFSQU1FVEVSUyIsIk5FWFRfUlNDX1VOSU9OX1FVRVJZIiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/app-router-headers.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/app-router.js": /*!****************************************************************!*\ !*** ./node_modules/next/dist/client/components/app-router.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getServerActionDispatcher: function() {\n return getServerActionDispatcher;\n },\n urlToUrlWithoutFlightMarker: function() {\n return urlToUrlWithoutFlightMarker;\n },\n default: function() {\n return AppRouter;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _approutercontext = __webpack_require__(/*! ../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _routerreducer = __webpack_require__(/*! ./router-reducer/router-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer.js\");\nconst _routerreducertypes = __webpack_require__(/*! ./router-reducer/router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _createhreffromurl = __webpack_require__(/*! ./router-reducer/create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _hooksclientcontext = __webpack_require__(/*! ../../shared/lib/hooks-client-context */ \"(app-client)/./node_modules/next/dist/shared/lib/hooks-client-context.js\");\nconst _usereducerwithdevtools = __webpack_require__(/*! ./use-reducer-with-devtools */ \"(app-client)/./node_modules/next/dist/client/components/use-reducer-with-devtools.js\");\nconst _errorboundary = __webpack_require__(/*! ./error-boundary */ \"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\");\nconst _createinitialrouterstate = __webpack_require__(/*! ./router-reducer/create-initial-router-state */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js\");\nconst _isbot = __webpack_require__(/*! ../../shared/lib/router/utils/is-bot */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/is-bot.js\");\nconst _addbasepath = __webpack_require__(/*! ../add-base-path */ \"(app-client)/./node_modules/next/dist/client/add-base-path.js\");\nconst _approuterannouncer = __webpack_require__(/*! ./app-router-announcer */ \"(app-client)/./node_modules/next/dist/client/components/app-router-announcer.js\");\nconst _redirectboundary = __webpack_require__(/*! ./redirect-boundary */ \"(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js\");\nconst _notfoundboundary = __webpack_require__(/*! ./not-found-boundary */ \"(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js\");\nconst _findheadincache = __webpack_require__(/*! ./router-reducer/reducers/find-head-in-cache */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js\");\nconst _infinitepromise = __webpack_require__(/*! ./infinite-promise */ \"(app-client)/./node_modules/next/dist/client/components/infinite-promise.js\");\nconst _approuterheaders = __webpack_require__(/*! ./app-router-headers */ \"(app-client)/./node_modules/next/dist/client/components/app-router-headers.js\");\nconst isServer = \"object\" === \"undefined\";\n// Ensure the initialParallelRoutes are not combined because of double-rendering in the browser with Strict Mode.\nlet initialParallelRoutes = isServer ? null : new Map();\nlet globalServerActionDispatcher = null;\nfunction getServerActionDispatcher() {\n return globalServerActionDispatcher;\n}\nfunction urlToUrlWithoutFlightMarker(url) {\n const urlWithoutFlightParameters = new URL(url, location.origin);\n urlWithoutFlightParameters.searchParams.delete(_approuterheaders.NEXT_RSC_UNION_QUERY);\n if (false) {}\n return urlWithoutFlightParameters;\n}\nconst HotReloader = false ? 0 : (__webpack_require__(/*! ./react-dev-overlay/hot-reloader-client */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js\")[\"default\"]);\nfunction isExternalURL(url) {\n return url.origin !== window.location.origin;\n}\nfunction HistoryUpdater(param) {\n let { tree, pushRef, canonicalUrl, sync } = param;\n (0, _react.useInsertionEffect)(()=>{\n // Identifier is shortened intentionally.\n // __NA is used to identify if the history entry can be handled by the app-router.\n // __N is used to identify if the history entry can be handled by the old router.\n const historyState = {\n __NA: true,\n tree\n };\n if (pushRef.pendingPush && (0, _createhreffromurl.createHrefFromUrl)(new URL(window.location.href)) !== canonicalUrl) {\n // This intentionally mutates React state, pushRef is overwritten to ensure additional push/replace calls do not trigger an additional history entry.\n pushRef.pendingPush = false;\n window.history.pushState(historyState, \"\", canonicalUrl);\n } else {\n window.history.replaceState(historyState, \"\", canonicalUrl);\n }\n sync();\n }, [\n tree,\n pushRef,\n canonicalUrl,\n sync\n ]);\n return null;\n}\n_c = HistoryUpdater;\nconst createEmptyCacheNode = ()=>({\n status: _approutercontext.CacheStates.LAZY_INITIALIZED,\n data: null,\n subTreeData: null,\n parallelRoutes: new Map()\n });\nfunction useServerActionDispatcher(changeByServerResponse, dispatch, navigate) {\n const serverActionDispatcher = (0, _react.useCallback)((actionPayload)=>{\n (0, _react.startTransition)(()=>{\n dispatch({\n ...actionPayload,\n type: _routerreducertypes.ACTION_SERVER_ACTION,\n mutable: {},\n navigate,\n changeByServerResponse\n });\n });\n }, [\n changeByServerResponse,\n dispatch,\n navigate\n ]);\n globalServerActionDispatcher = serverActionDispatcher;\n}\n/**\n * Server response that only patches the cache and tree.\n */ function useChangeByServerResponse(dispatch) {\n return (0, _react.useCallback)((previousTree, flightData, overrideCanonicalUrl)=>{\n (0, _react.startTransition)(()=>{\n dispatch({\n type: _routerreducertypes.ACTION_SERVER_PATCH,\n flightData,\n previousTree,\n overrideCanonicalUrl,\n cache: createEmptyCacheNode(),\n mutable: {}\n });\n });\n }, [\n dispatch\n ]);\n}\nfunction useNavigate(dispatch) {\n return (0, _react.useCallback)((href, navigateType, forceOptimisticNavigation, shouldScroll)=>{\n const url = new URL((0, _addbasepath.addBasePath)(href), location.href);\n return dispatch({\n type: _routerreducertypes.ACTION_NAVIGATE,\n url,\n isExternalUrl: isExternalURL(url),\n locationSearch: location.search,\n forceOptimisticNavigation,\n shouldScroll: shouldScroll != null ? shouldScroll : true,\n navigateType,\n cache: createEmptyCacheNode(),\n mutable: {}\n });\n }, [\n dispatch\n ]);\n}\n/**\n * The global router that wraps the application components.\n */ function Router(param) {\n _s();\n let { buildId, initialHead, initialTree, initialCanonicalUrl, children, assetPrefix, notFound, notFoundStyles, asNotFound } = param;\n const initialState = (0, _react.useMemo)(()=>(0, _createinitialrouterstate.createInitialRouterState)({\n buildId,\n children,\n initialCanonicalUrl,\n initialTree,\n initialParallelRoutes,\n isServer,\n location: !isServer ? window.location : null,\n initialHead\n }), [\n buildId,\n children,\n initialCanonicalUrl,\n initialTree,\n initialHead\n ]);\n const [{ tree, cache, prefetchCache, pushRef, focusAndScrollRef, canonicalUrl, nextUrl }, dispatch, sync] = (0, _usereducerwithdevtools.useReducerWithReduxDevtools)(_routerreducer.reducer, initialState);\n (0, _react.useEffect)(()=>{\n // Ensure initialParallelRoutes is cleaned up from memory once it's used.\n initialParallelRoutes = null;\n }, []);\n // Add memoized pathname/query for useSearchParams and usePathname.\n const { searchParams, pathname } = (0, _react.useMemo)(()=>{\n const url = new URL(canonicalUrl, false ? 0 : window.location.href);\n return {\n // This is turned into a readonly class in `useSearchParams`\n searchParams: url.searchParams,\n pathname: url.pathname\n };\n }, [\n canonicalUrl\n ]);\n const changeByServerResponse = useChangeByServerResponse(dispatch);\n const navigate = useNavigate(dispatch);\n useServerActionDispatcher(changeByServerResponse, dispatch, navigate);\n /**\n * The app router that is exposed through `useRouter`. It's only concerned with dispatching actions to the reducer, does not hold state.\n */ const appRouter = (0, _react.useMemo)(()=>{\n const routerInstance = {\n back: ()=>window.history.back(),\n forward: ()=>window.history.forward(),\n prefetch: (href, options)=>{\n // If prefetch has already been triggered, don't trigger it again.\n if ((0, _isbot.isBot)(window.navigator.userAgent)) {\n return;\n }\n const url = new URL((0, _addbasepath.addBasePath)(href), location.href);\n // External urls can't be prefetched in the same way.\n if (isExternalURL(url)) {\n return;\n }\n (0, _react.startTransition)(()=>{\n var _options_kind;\n dispatch({\n type: _routerreducertypes.ACTION_PREFETCH,\n url,\n kind: (_options_kind = options == null ? void 0 : options.kind) != null ? _options_kind : _routerreducertypes.PrefetchKind.FULL\n });\n });\n },\n replace: (href, options)=>{\n if (options === void 0) options = {};\n (0, _react.startTransition)(()=>{\n var _options_scroll;\n navigate(href, \"replace\", Boolean(options.forceOptimisticNavigation), (_options_scroll = options.scroll) != null ? _options_scroll : true);\n });\n },\n push: (href, options)=>{\n if (options === void 0) options = {};\n (0, _react.startTransition)(()=>{\n var _options_scroll;\n navigate(href, \"push\", Boolean(options.forceOptimisticNavigation), (_options_scroll = options.scroll) != null ? _options_scroll : true);\n });\n },\n refresh: ()=>{\n (0, _react.startTransition)(()=>{\n dispatch({\n type: _routerreducertypes.ACTION_REFRESH,\n cache: createEmptyCacheNode(),\n mutable: {},\n origin: window.location.origin\n });\n });\n },\n // @ts-ignore we don't want to expose this method at all\n fastRefresh: ()=>{\n if (false) {} else {\n (0, _react.startTransition)(()=>{\n dispatch({\n type: _routerreducertypes.ACTION_FAST_REFRESH,\n cache: createEmptyCacheNode(),\n mutable: {},\n origin: window.location.origin\n });\n });\n }\n }\n };\n return routerInstance;\n }, [\n dispatch,\n navigate\n ]);\n (0, _react.useEffect)(()=>{\n // Exists for debugging purposes. Don't use in application code.\n if (window.next) {\n window.next.router = appRouter;\n }\n }, [\n appRouter\n ]);\n if (true) {\n // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, _react.useEffect)(()=>{\n // Add `window.nd` for debugging purposes.\n // This is not meant for use in applications as concurrent rendering will affect the cache/tree/router.\n // @ts-ignore this is for debugging\n window.nd = {\n router: appRouter,\n cache,\n prefetchCache,\n tree\n };\n }, [\n appRouter,\n cache,\n prefetchCache,\n tree\n ]);\n }\n // When mpaNavigation flag is set do a hard navigation to the new url.\n // Infinitely suspend because we don't actually want to rerender any child\n // components with the new URL and any entangled state updates shouldn't\n // commit either (eg: useTransition isPending should stay true until the page\n // unloads).\n //\n // This is a side effect in render. Don't try this at home, kids. It's\n // probably safe because we know this is a singleton component and it's never\n // in <Offscreen>. At least I hope so. (It will run twice in dev strict mode,\n // but that's... fine?)\n if (pushRef.mpaNavigation) {\n const location1 = window.location;\n if (pushRef.pendingPush) {\n location1.assign(canonicalUrl);\n } else {\n location1.replace(canonicalUrl);\n }\n // TODO-APP: Should we listen to navigateerror here to catch failed\n // navigations somehow? And should we call window.stop() if a SPA navigation\n // should interrupt an MPA one?\n (0, _react.use)((0, _infinitepromise.createInfinitePromise)());\n }\n /**\n * Handle popstate event, this is used to handle back/forward in the browser.\n * By default dispatches ACTION_RESTORE, however if the history entry was not pushed/replaced by app-router it will reload the page.\n * That case can happen when the old router injected the history entry.\n */ const onPopState = (0, _react.useCallback)((param)=>{\n let { state } = param;\n if (!state) {\n // TODO-APP: this case only happens when pushState/replaceState was called outside of Next.js. It should probably reload the page in this case.\n return;\n }\n // This case happens when the history entry was pushed by the `pages` router.\n if (!state.__NA) {\n window.location.reload();\n return;\n }\n // @ts-ignore useTransition exists\n // TODO-APP: Ideally the back button should not use startTransition as it should apply the updates synchronously\n // Without startTransition works if the cache is there for this path\n (0, _react.startTransition)(()=>{\n dispatch({\n type: _routerreducertypes.ACTION_RESTORE,\n url: new URL(window.location.href),\n tree: state.tree\n });\n });\n }, [\n dispatch\n ]);\n // Register popstate event to call onPopstate.\n (0, _react.useEffect)(()=>{\n window.addEventListener(\"popstate\", onPopState);\n return ()=>{\n window.removeEventListener(\"popstate\", onPopState);\n };\n }, [\n onPopState\n ]);\n const head = (0, _react.useMemo)(()=>{\n return (0, _findheadincache.findHeadInCache)(cache, tree[1]);\n }, [\n cache,\n tree\n ]);\n const notFoundProps = {\n notFound,\n notFoundStyles,\n asNotFound\n };\n const content = /*#__PURE__*/ _react.default.createElement(_redirectboundary.RedirectBoundary, null, head, cache.subTreeData, /*#__PURE__*/ _react.default.createElement(_approuterannouncer.AppRouterAnnouncer, {\n tree: tree\n }));\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(HistoryUpdater, {\n tree: tree,\n pushRef: pushRef,\n canonicalUrl: canonicalUrl,\n sync: sync\n }), /*#__PURE__*/ _react.default.createElement(_hooksclientcontext.PathnameContext.Provider, {\n value: pathname\n }, /*#__PURE__*/ _react.default.createElement(_hooksclientcontext.SearchParamsContext.Provider, {\n value: searchParams\n }, /*#__PURE__*/ _react.default.createElement(_approutercontext.GlobalLayoutRouterContext.Provider, {\n value: {\n buildId,\n changeByServerResponse,\n tree,\n focusAndScrollRef,\n nextUrl\n }\n }, /*#__PURE__*/ _react.default.createElement(_approutercontext.AppRouterContext.Provider, {\n value: appRouter\n }, /*#__PURE__*/ _react.default.createElement(_approutercontext.LayoutRouterContext.Provider, {\n value: {\n childNodes: cache.parallelRoutes,\n tree: tree,\n // Root node always has `url`\n // Provided in AppTreeContext to ensure it can be overwritten in layout-router\n url: canonicalUrl\n }\n }, HotReloader ? /*#__PURE__*/ _react.default.createElement(HotReloader, {\n assetPrefix: assetPrefix,\n ...notFoundProps\n }, content) : /*#__PURE__*/ _react.default.createElement(_notfoundboundary.NotFoundBoundary, notFoundProps, content)))))));\n}\n_s(Router, \"q0MfV9e9/a1iyE4/7qfUaQkhGE8=\", false, function() {\n return [\n useChangeByServerResponse,\n useNavigate,\n useServerActionDispatcher\n ];\n});\n_c1 = Router;\nfunction AppRouter(props) {\n const { globalErrorComponent, ...rest } = props;\n return /*#__PURE__*/ _react.default.createElement(_errorboundary.ErrorBoundary, {\n errorComponent: globalErrorComponent\n }, /*#__PURE__*/ _react.default.createElement(Router, rest));\n}\n_c2 = AppRouter;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=app-router.js.map\nvar _c, _c1, _c2;\n$RefreshReg$(_c, \"HistoryUpdater\");\n$RefreshReg$(_c1, \"Router\");\n$RefreshReg$(_c2, \"AppRouter\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9hcHAtcm91dGVyLmpzIiwibWFwcGluZ3MiOiJxREFDYTs7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FJTjtBQUNBLFNBQVNJLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlWLE9BQU9DLGNBQWMsQ0FBQ1EsUUFBUUUsTUFBTTtRQUNwREMsWUFBWTtRQUNaQyxLQUFLSCxHQUFHLENBQUNDLEtBQUs7SUFDbEI7QUFDSjtBQUNBSCxRQUFRTixTQUFTO0lBQ2JH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zZXJBZ2VudCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSBuZXcgVVJMKCgwLCBfYWRkYmFzZXBhdGguYWRkQmFzZVBhdGgpKGhyZWYpLCBsb2NhdGlvbi5ocmVmKTtcbiAgICAgICAgICAgICAgICAvLyBFeHRlcm5hbCB1cmxzIGNhbid0IGJlIHByZWZldGNoZWQgaW4gdGhlIHNhbWUgd2F5LlxuICAgICAgICAgICAgICAgIGlmIChpc0V4dGVybmFsVVJMKHVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAoMCwgX3JlYWN0LnN0YXJ0VHJhbnNpdGlvbikoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9vcHRpb25zX2tpbmQ7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IF9yb3V0ZXJyZWR1Y2VydHlwZXMuQUNUSU9OX1BSRUZFVENILFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAga2luZDogKF9vcHRpb25zX2tpbmQgPSBvcHRpb25zID09IG51bGwgPyB2b2lkIDAgOiBvcHRpb25zLmtpbmQpICE9IG51bGwgPyBfb3B0aW9uc19raW5kIDogX3JvdXRlcnJlZHVjZXJ0eXBlcy5QcmVmZXRjaEtpbmQuRlVMTFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByZXBsYWNlOiAoaHJlZiwgb3B0aW9ucyk9PntcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucyA9PT0gdm9pZCAwKSBvcHRpb25zID0ge307XG4gICAgICAgICAgICAgICAgKDAsIF9yZWFjdC5zdGFydFRyYW5zaXRpb24pKCgpPT57XG4gICAgICAgICAgICAgICAgICAgIHZhciBfb3B0aW9uc19zY3JvbGw7XG4gICAgICAgICAgICAgICAgICAgIG5hdmlnYXRlKGhyZWYsIFwicmVwbGFjZVwiLCBCb29sZWFuKG9wdGlvbnMuZm9yY2VPcHRpbWlzdGljTmF2aWdhdGlvbiksIChfb3B0aW9uc19zY3JvbGwgPSBvcHRpb25zLnNjcm9sbCkgIT0gbnVsbCA/IF9vcHRpb25zX3Njcm9sbCA6IHRydWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHB1c2g6IChocmVmLCBvcHRpb25zKT0+e1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zID09PSB2b2lkIDApIG9wdGlvbnMgPSB7fTtcbiAgICAgICAgICAgICAgICAoMCwgX3JlYWN0LnN0YXJ0VHJhbnNpdGlvbikoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9vcHRpb25zX3Njcm9sbDtcbiAgICAgICAgICAgICAgICAgICAgbmF2aWdhdGUoaHJlZiwgXCJwdXNoXCIsIEJvb2xlYW4ob3B0aW9ucy5mb3JjZU9wdGltaXN0aWNOYXZpZ2F0aW9uKSwgKF9vcHRpb25zX3Njcm9sbCA9IG9wdGlvbnMuc2Nyb2xsKSAhPSBudWxsID8gX29wdGlvbnNfc2Nyb2xsIDogdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVmcmVzaDogKCk9PntcbiAgICAgICAgICAgICAgICAoMCwgX3JlYWN0LnN0YXJ0VHJhbnNpdGlvbikoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogX3JvdXRlcnJlZHVjZXJ0eXBlcy5BQ1RJT05fUkVGUkVTSCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlOiBjcmVhdGVFbXB0eUNhY2hlTm9kZSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0YWJsZToge30sXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW46IHdpbmRvdy5sb2NhdGlvbi5vcmlnaW5cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZSB3ZSBkb24ndCB3YW50IHRvIGV4cG9zZSB0aGlzIG1ldGhvZCBhdCBhbGxcbiAgICAgICAgICAgIGZhc3RSZWZyZXNoOiAoKT0+e1xuICAgICAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJkZXZlbG9wbWVudFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcImZhc3RSZWZyZXNoIGNhbiBvbmx5IGJlIHVzZWQgaW4gZGV2ZWxvcG1lbnQgbW9kZS4gUGxlYXNlIHVzZSByZWZyZXNoIGluc3RlYWQuXCIpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICgwLCBfcmVhY3Quc3RhcnRUcmFuc2l0aW9uKSgoKT0+e1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IF9yb3V0ZXJyZWR1Y2VydHlwZXMuQUNUSU9OX0ZBU1RfUkVGUkVTSCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZTogY3JlYXRlRW1wdHlDYWNoZU5vZGUoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdXRhYmxlOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW46IHdpbmRvdy5sb2NhdGlvbi5vcmlnaW5cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICA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nRMaXN0ZW5lciIsInJlbW92ZUV2ZW50TGlzdGVuZXIiLCJoZWFkIiwiZmluZEhlYWRJbkNhY2hlIiwibm90Rm91bmRQcm9wcyIsImNvbnRlbnQiLCJjcmVhdGVFbGVtZW50IiwiUmVkaXJlY3RCb3VuZGFyeSIsIkFwcFJvdXRlckFubm91bmNlciIsIkZyYWdtZW50IiwiUGF0aG5hbWVDb250ZXh0IiwiUHJvdmlkZXIiLCJTZWFyY2hQYXJhbXNDb250ZXh0IiwiR2xvYmFsTGF5b3V0Um91dGVyQ29udGV4dCIsIkFwcFJvdXRlckNvbnRleHQiLCJMYXlvdXRSb3V0ZXJDb250ZXh0IiwiY2hpbGROb2RlcyIsIk5vdEZvdW5kQm91bmRhcnkiLCJwcm9wcyIsImdsb2JhbEVycm9yQ29tcG9uZW50IiwicmVzdCIsIkVycm9yQm91bmRhcnkiLCJlcnJvckNvbXBvbmVudCIsIl9fZXNNb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/app-router.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/client-hook-in-server-component-error.js": /*!*******************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/client-hook-in-server-component-error.js ***! \*******************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"clientHookInServerComponentError\", ({\n enumerable: true,\n get: function() {\n return clientHookInServerComponentError;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nfunction clientHookInServerComponentError(hookName) {\n if (true) {\n // If useState is undefined we're in a server component\n if (!_react.default.useState) {\n throw new Error(\"\" + hookName + ' only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component');\n }\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=client-hook-in-server-component-error.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9jbGllbnQtaG9vay1pbi1zZXJ2ZXItY29tcG9uZW50LWVycm9yLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxvRUFBbUU7SUFDL0RJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQywyQkFBMkJDLG1CQUFPQSxDQUFDLHlIQUF5QztBQUNsRixNQUFNQyxTQUFTLFdBQVcsR0FBR0YseUJBQXlCRyxDQUFDLENBQUNGLG1CQUFPQSxDQUFDLDRFQUFPO0FBQ3ZFLFNBQVNGLGlDQUFpQ0ssUUFBUTtJQUM5QyxJQUFJQyxJQUFxQyxFQUFFO1FBQ3ZDLHVEQUF1RDtRQUN2RCxJQUFJLENBQUNILE9BQU9JLE9BQU8sQ0FBQ0MsUUFBUSxFQUFFO1lBQzFCLE1BQU0sSUFBSUMsTUFBTSxLQUFLSixXQUFXO1FBQ3BDO0lBQ0o7QUFDSjtBQUVBLElBQUksQ0FBQyxPQUFPVCxRQUFRVyxPQUFPLEtBQUssY0FBZSxPQUFPWCxRQUFRVyxPQUFPLEtBQUssWUFBWVgsUUFBUVcsT0FBTyxLQUFLLElB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WNvbXBvbmVudC1lcnJvci5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiY2xpZW50SG9va0luU2VydmVyQ29tcG9uZW50RXJyb3IiLCJfaW50ZXJvcF9yZXF1aXJlX2RlZmF1bHQiLCJyZXF1aXJlIiwiX3JlYWN0IiwiXyIsImhvb2tOYW1lIiwicHJvY2VzcyIsImRlZmF1bHQiLCJ1c2VTdGF0ZSIsIkVycm9yIiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/client-hook-in-server-component-error.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/error-boundary.js": /*!********************************************************************!*\ !*** ./node_modules/next/dist/client/components/error-boundary.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ErrorBoundaryHandler: function() {\n return ErrorBoundaryHandler;\n },\n default: function() {\n return GlobalError;\n },\n ErrorBoundary: function() {\n return ErrorBoundary;\n }\n});\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _navigation = __webpack_require__(/*! ./navigation */ \"(app-client)/./node_modules/next/dist/client/components/navigation.js\");\nconst styles = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily: 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: \"100vh\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n text: {\n fontSize: \"14px\",\n fontWeight: 400,\n lineHeight: \"28px\",\n margin: \"0 8px\"\n }\n};\nclass ErrorBoundaryHandler extends _react.default.Component {\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n static getDerivedStateFromProps(props, state) {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */ if (props.pathname !== state.previousPathname && state.error) {\n return {\n error: null,\n previousPathname: props.pathname\n };\n }\n return {\n error: state.error,\n previousPathname: props.pathname\n };\n }\n render() {\n if (this.state.error) {\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, this.props.errorStyles, /*#__PURE__*/ _react.default.createElement(this.props.errorComponent, {\n error: this.state.error,\n reset: this.reset\n }));\n }\n return this.props.children;\n }\n constructor(props){\n super(props);\n this.reset = ()=>{\n this.setState({\n error: null\n });\n };\n this.state = {\n error: null,\n previousPathname: this.props.pathname\n };\n }\n}\nfunction GlobalError(param) {\n let { error } = param;\n const digest = error == null ? void 0 : error.digest;\n return /*#__PURE__*/ _react.default.createElement(\"html\", null, /*#__PURE__*/ _react.default.createElement(\"head\", null), /*#__PURE__*/ _react.default.createElement(\"body\", null, /*#__PURE__*/ _react.default.createElement(\"div\", {\n style: styles.error\n }, /*#__PURE__*/ _react.default.createElement(\"div\", null, /*#__PURE__*/ _react.default.createElement(\"h2\", {\n style: styles.text\n }, \"Application error: a \" + (digest ? \"server\" : \"client\") + \"-side exception has occurred (see the \" + (digest ? \"server logs\" : \"browser console\") + \" for more information).\"), digest ? /*#__PURE__*/ _react.default.createElement(\"p\", {\n style: styles.text\n }, \"Digest: \" + digest) : null))));\n}\n_c = GlobalError;\nfunction ErrorBoundary(param) {\n let { errorComponent, errorStyles, children } = param;\n const pathname = (0, _navigation.usePathname)();\n if (errorComponent) {\n return /*#__PURE__*/ _react.default.createElement(ErrorBoundaryHandler, {\n pathname: pathname,\n errorComponent: errorComponent,\n errorStyles: errorStyles\n }, children);\n }\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, children);\n}\n_c1 = ErrorBoundary;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=error-boundary.js.map\nvar _c, _c1;\n$RefreshReg$(_c, \"GlobalError\");\n$RefreshReg$(_c1, \"ErrorBoundary\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9lcnJvci1ib3VuZGFyeS5qcyIsIm1hcHBpbmdzIjoicURBQ2E7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FJTjtBQUNBLFNBQVNJLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlWLE9BQU9DLGNBQWMsQ0FBQ1EsUUFBUUUsTUFBTTtRQUNwREMsWUFBWTtRQUNaQyxLQUFLSCxHQUFHLENBQUNDLEtBQUs7SUFDbEI7QUFDSjtBQUNBSCxRQUFRTixTQUFTO0lBQ2JHLHNCQUFzQjtRQUNsQixPQUFPQTtJQUNYO0lBQ0FDLFNBQVM7UUFDTCxPQUFPUTtJQUNYO0lBQ0FQLGVB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GF0aG5hbWUgIT09IHN0YXRlLnByZXZpb3VzUGF0aG5hbWUgJiYgc3RhdGUuZXJyb3IpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgZXJyb3I6IG51bGwsXG4gICAgICAgICAgICAgICAgcHJldmlvdXNQYXRobmFtZTogcHJvcHMucGF0aG5hbWVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGVycm9yOiBzdGF0ZS5lcnJvcixcbiAgICAgICAgICAgIHByZXZpb3VzUGF0aG5hbWU6IHByb3BzLnBhdGhuYW1lXG4gICAgICAgIH07XG4gICAgfVxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgaWYgKHRoaXMuc3RhdGUuZXJyb3IpIHtcbiAgICAgICAgICAgIHJldHVybiAvKiNfX1BVUkVfXyovIF9yZWFjdC5kZWZhdWx0LmNyZWF0ZUVsZW1lbnQoX3JlYWN0LmRlZmF1bHQuRnJhZ21lbnQsIG51bGwsIHRoaXMucHJvcHMuZXJyb3JTdHlsZXMsIC8qI19fUFVSRV9fKi8gX3JlYWN0LmRlZmF1bHQuY3JlYXRlRWxlbWVudCh0aGlzLnByb3BzLmVycm9yQ29tcG9uZW50LCB7XG4gICAgICAgICAgICAgICAgZXJyb3I6IHRoaXMuc3RhdGUuZXJyb3IsXG4gICAgICAgICAgICAgICAgcmVzZXQ6IHRoaXMucmVzZXRcbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5jaGlsZHJlbjtcbiAgICB9XG4gICAgY29uc3RydWN0b3IocHJvcHMpe1xuICAgICAgICBzdXBlcihwcm9wcyk7XG4gICAgICAgIHRoaXMucmVzZXQgPSAoKT0+e1xuICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICAgICAgICAgICAgZXJyb3I6IG51bGxcbiAgICAgICAgICAgIH0pO1xuICAgICAgIC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bGVzIiwiZXJyb3JDb21wb25lbnQiLCJyZXNldCIsImNoaWxkcmVuIiwiY29uc3RydWN0b3IiLCJzZXRTdGF0ZSIsInBhcmFtIiwiZGlnZXN0Iiwic3R5bGUiLCJ1c2VQYXRobmFtZSIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/error-boundary.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/infinite-promise.js": /*!**********************************************************************!*\ !*** ./node_modules/next/dist/client/components/infinite-promise.js ***! \**********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Used to cache in createInfinitePromise\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createInfinitePromise\", ({\n enumerable: true,\n get: function() {\n return createInfinitePromise;\n }\n}));\nlet infinitePromise;\nfunction createInfinitePromise() {\n if (!infinitePromise) {\n // Only create the Promise once\n infinitePromise = new Promise(()=>{\n // This is used to debug when the rendering is never updated.\n // setTimeout(() => {\n // infinitePromise = new Error('Infinite promise')\n // resolve()\n // }, 5000)\n });\n }\n return infinitePromise;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=infinite-promise.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9pbmZpbml0ZS1wcm9taXNlLmpzIiwibWFwcGluZ3MiOiJBQUFBOztDQUVDLEdBQWdCO0FBQ2pCQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQ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KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5maW5pdGUtcHJvbWlzZS5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiY3JlYXRlSW5maW5pdGVQcm9taXNlIiwiaW5maW5pdGVQcm9taXNlIiwiUHJvbWlzZSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/infinite-promise.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/is-next-router-error.js": /*!**************************************************************************!*\ !*** ./node_modules/next/dist/client/components/is-next-router-error.js ***! \**************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"isNextRouterError\", ({\n enumerable: true,\n get: function() {\n return isNextRouterError;\n }\n}));\nconst _notfound = __webpack_require__(/*! ./not-found */ \"(app-client)/./node_modules/next/dist/client/components/not-found.js\");\nconst _redirect = __webpack_require__(/*! ./redirect */ \"(app-client)/./node_modules/next/dist/client/components/redirect.js\");\nfunction isNextRouterError(error) {\n return error && error.digest && ((0, _redirect.isRedirectError)(error) || (0, _notfound.isNotFoundError)(error));\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=is-next-router-error.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMapping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plY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1pcy1uZXh0LXJvdXRlci1lcnJvci5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiaXNOZXh0Um91dGVyRXJyb3IiLCJfbm90Zm91bmQiLCJyZXF1aXJlIiwiX3JlZGlyZWN0IiwiZXJyb3IiLCJkaWdlc3QiLCJpc1JlZGlyZWN0RXJyb3IiLCJpc05vdEZvdW5kRXJyb3IiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/is-next-router-error.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/match-segments.js": /*!********************************************************************!*\ !*** ./node_modules/next/dist/client/components/match-segments.js ***! \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n matchSegment: function() {\n return matchSegment;\n },\n canSegmentBeOverridden: function() {\n return canSegmentBeOverridden;\n }\n});\nconst _getsegmentparam = __webpack_require__(/*! ../../server/app-render/get-segment-param */ \"(app-client)/./node_modules/next/dist/server/app-render/get-segment-param.js\");\nconst matchSegment = (existingSegment, segment)=>{\n // segment is either Array or string\n if (typeof existingSegment === \"string\") {\n if (typeof segment === \"string\") {\n // Common case: segment is just a string\n return existingSegment === segment;\n }\n return false;\n }\n if (typeof segment === \"string\") {\n return false;\n }\n return existingSegment[0] === segment[0] && existingSegment[1] === segment[1];\n};\nconst canSegmentBeOverridden = (existingSegment, segment)=>{\n var _getSegmentParam;\n if (Array.isArray(existingSegment) || !Array.isArray(segment)) {\n return false;\n }\n return ((_getSegmentParam = (0, _getsegmentparam.getSegmentParam)(existingSegment)) == null ? void 0 : _getSegmentParam.param) === segment[0];\n};\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=match-segments.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9tYXRjaC1zZWdtZW50cy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUdOO0FBQ0EsU0FBU0csUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsUUFBUUQsSUFBSVQsT0FBT0MsY0FBYyxDQUFDTyxRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDLEtBQUtILEdBQUcsQ0FBQ0MsS0FBSztJQUNsQjtBQUNKO0FBQ0FILFFBQVFMLFNBQVM7SUFDYkcsY0FBYztRQUNWLE9BQU9BO0lBQ1g7SUFDQUMsd0JBQXdCO1FBQ3BCLE9BQU9BO0lBQ1g7QUFDSjtBQUNBLE1BQU1PLG1CQUFtQkMsbUJBQU9BLENBQUMsK0hBQTJDO0FBQzVFLE1BQU1ULGVBQWUsQ0FBQ1UsaUJBQWlCQztJQUNuQyxvQ0FBb0M7SUFDcEMsSUFBSSxPQUFPRCxvQkFBb0IsVU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1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bWF0Y2gtc2VnbWVudHMuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwibW9kdWxlIiwibWF0Y2hTZWdtZW50IiwiY2FuU2VnbWVudEJlT3ZlcnJpZGRlbiIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9nZXRzZWdtZW50cGFyYW0iLCJyZXF1aXJlIiwiZXhpc3RpbmdTZWdtZW50Iiwic2VnbWVudCIsIl9nZXRTZWdtZW50UGFyYW0iLCJBcnJheSIsImlzQXJyYXkiLCJnZXRTZWdtZW50UGFyYW0iLCJwYXJhbSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/match-segments.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/navigation.js": /*!****************************************************************!*\ !*** ./node_modules/next/dist/client/components/navigation.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// useLayoutSegments() // Only the segments for the current place. ['children', 'dashboard', 'children', 'integrations'] -> /dashboard/integrations (/dashboard/layout.js would get ['children', 'dashboard', 'children', 'integrations'])\n\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ReadonlyURLSearchParams: function() {\n return ReadonlyURLSearchParams;\n },\n useSearchParams: function() {\n return useSearchParams;\n },\n usePathname: function() {\n return usePathname;\n },\n ServerInsertedHTMLContext: function() {\n return _serverinsertedhtml.ServerInsertedHTMLContext;\n },\n useServerInsertedHTML: function() {\n return _serverinsertedhtml.useServerInsertedHTML;\n },\n useRouter: function() {\n return useRouter;\n },\n useParams: function() {\n return useParams;\n },\n useSelectedLayoutSegments: function() {\n return useSelectedLayoutSegments;\n },\n useSelectedLayoutSegment: function() {\n return useSelectedLayoutSegment;\n },\n redirect: function() {\n return _redirect.redirect;\n },\n notFound: function() {\n return _notfound.notFound;\n }\n});\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nconst _approutercontext = __webpack_require__(/*! ../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _hooksclientcontext = __webpack_require__(/*! ../../shared/lib/hooks-client-context */ \"(app-client)/./node_modules/next/dist/shared/lib/hooks-client-context.js\");\nconst _clienthookinservercomponenterror = __webpack_require__(/*! ./client-hook-in-server-component-error */ \"(app-client)/./node_modules/next/dist/client/components/client-hook-in-server-component-error.js\");\nconst _getsegmentvalue = __webpack_require__(/*! ./router-reducer/reducers/get-segment-value */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js\");\nconst _serverinsertedhtml = __webpack_require__(/*! ../../shared/lib/server-inserted-html */ \"(app-client)/./node_modules/next/dist/shared/lib/server-inserted-html.js\");\nconst _redirect = __webpack_require__(/*! ./redirect */ \"(app-client)/./node_modules/next/dist/client/components/redirect.js\");\nconst _notfound = __webpack_require__(/*! ./not-found */ \"(app-client)/./node_modules/next/dist/client/components/not-found.js\");\nconst INTERNAL_URLSEARCHPARAMS_INSTANCE = Symbol(\"internal for urlsearchparams readonly\");\nfunction readonlyURLSearchParamsError() {\n return new Error(\"ReadonlyURLSearchParams cannot be modified\");\n}\nclass ReadonlyURLSearchParams {\n [Symbol.iterator]() {\n return this[INTERNAL_URLSEARCHPARAMS_INSTANCE][Symbol.iterator]();\n }\n append() {\n throw readonlyURLSearchParamsError();\n }\n delete() {\n throw readonlyURLSearchParamsError();\n }\n set() {\n throw readonlyURLSearchParamsError();\n }\n sort() {\n throw readonlyURLSearchParamsError();\n }\n constructor(urlSearchParams){\n this[INTERNAL_URLSEARCHPARAMS_INSTANCE] = urlSearchParams;\n this.entries = urlSearchParams.entries.bind(urlSearchParams);\n this.forEach = urlSearchParams.forEach.bind(urlSearchParams);\n this.get = urlSearchParams.get.bind(urlSearchParams);\n this.getAll = urlSearchParams.getAll.bind(urlSearchParams);\n this.has = urlSearchParams.has.bind(urlSearchParams);\n this.keys = urlSearchParams.keys.bind(urlSearchParams);\n this.values = urlSearchParams.values.bind(urlSearchParams);\n this.toString = urlSearchParams.toString.bind(urlSearchParams);\n }\n}\nfunction useSearchParams() {\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"useSearchParams\");\n const searchParams = (0, _react.useContext)(_hooksclientcontext.SearchParamsContext);\n // In the case where this is `null`, the compat types added in\n // `next-env.d.ts` will add a new overload that changes the return type to\n // include `null`.\n const readonlySearchParams = (0, _react.useMemo)(()=>{\n if (!searchParams) {\n // When the router is not ready in pages, we won't have the search params\n // available.\n return null;\n }\n return new ReadonlyURLSearchParams(searchParams);\n }, [\n searchParams\n ]);\n if (false) {}\n return readonlySearchParams;\n}\nfunction usePathname() {\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"usePathname\");\n // In the case where this is `null`, the compat types added in `next-env.d.ts`\n // will add a new overload that changes the return type to include `null`.\n return (0, _react.useContext)(_hooksclientcontext.PathnameContext);\n}\nfunction useRouter() {\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"useRouter\");\n const router = (0, _react.useContext)(_approutercontext.AppRouterContext);\n if (router === null) {\n throw new Error(\"invariant expected app router to be mounted\");\n }\n return router;\n}\n// this function performs a depth-first search of the tree to find the selected\n// params\nfunction getSelectedParams(tree, params) {\n if (params === void 0) params = {};\n const parallelRoutes = tree[1];\n for (const parallelRoute of Object.values(parallelRoutes)){\n const segment = parallelRoute[0];\n const isDynamicParameter = Array.isArray(segment);\n const segmentValue = isDynamicParameter ? segment[1] : segment;\n if (!segmentValue || segmentValue.startsWith(\"__PAGE__\")) continue;\n if (isDynamicParameter) {\n params[segment[0]] = segment[1];\n }\n params = getSelectedParams(parallelRoute, params);\n }\n return params;\n}\nfunction useParams() {\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"useParams\");\n const globalLayoutRouterContext = (0, _react.useContext)(_approutercontext.GlobalLayoutRouterContext);\n if (!globalLayoutRouterContext) {\n // This only happens in `pages`. Type is overwritten in navigation.d.ts\n return null;\n }\n return getSelectedParams(globalLayoutRouterContext.tree);\n}\n// TODO-APP: handle parallel routes\n/**\n * Get the canonical parameters from the current level to the leaf node.\n */ function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first, segmentPath) {\n if (first === void 0) first = true;\n if (segmentPath === void 0) segmentPath = [];\n let node;\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey];\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1];\n var _parallelRoutes_children;\n node = (_parallelRoutes_children = parallelRoutes.children) != null ? _parallelRoutes_children : Object.values(parallelRoutes)[0];\n }\n if (!node) return segmentPath;\n const segment = node[0];\n const segmentValue = (0, _getsegmentvalue.getSegmentValue)(segment);\n if (!segmentValue || segmentValue.startsWith(\"__PAGE__\")) return segmentPath;\n segmentPath.push(segmentValue);\n return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);\n}\nfunction useSelectedLayoutSegments(parallelRouteKey) {\n if (parallelRouteKey === void 0) parallelRouteKey = \"children\";\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"useSelectedLayoutSegments\");\n const { tree } = (0, _react.useContext)(_approutercontext.LayoutRouterContext);\n return getSelectedLayoutSegmentPath(tree, parallelRouteKey);\n}\nfunction useSelectedLayoutSegment(parallelRouteKey) {\n _s();\n if (parallelRouteKey === void 0) parallelRouteKey = \"children\";\n (0, _clienthookinservercomponenterror.clientHookInServerComponentError)(\"useSelectedLayoutSegment\");\n const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey);\n if (selectedLayoutSegments.length === 0) {\n return null;\n }\n return selectedLayoutSegments[0];\n}\n_s(useSelectedLayoutSegment, \"rc1U92JxkDTv7MNGlutCvlwOCmc=\", false, function() {\n return [\n useSelectedLayoutSegments\n ];\n});\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=navigation.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9uYXZpZ2F0aW9uLmpzIiwibWFwcGluZ3MiOiJBQUFBLDBPQUEwTztBQUM3Tjs7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FZTjtBQUNBLFNBQVNZLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlsQixPQUFPQyxjQUFjLENBQUNnQixRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDLEtBQUtILEdBQUcsQ0FBQ0MsS0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yQ29udGV4dCIsImdldFNlbGVjdGVkTGF5b3V0U2VnbWVudFBhdGgiLCJwYXJhbGxlbFJvdXRlS2V5IiwiZmlyc3QiLCJzZWdtZW50UGF0aCIsIm5vZGUiLCJfcGFyYWxsZWxSb3V0ZXNfY2hpbGRyZW4iLCJjaGlsZHJlbiIsImdldFNlZ21lbnRWYWx1ZSIsInB1c2giLCJMYXlvdXRSb3V0ZXJDb250ZXh0Iiwic2VsZWN0ZWRMYXlvdXRTZWdtZW50cyIsImxlbmd0aCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/navigation.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js": /*!************************************************************************!*\ !*** ./node_modules/next/dist/client/components/not-found-boundary.js ***! \************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"NotFoundBoundary\", ({\n enumerable: true,\n get: function() {\n return NotFoundBoundary;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _navigation = __webpack_require__(/*! ./navigation */ \"(app-client)/./node_modules/next/dist/client/components/navigation.js\");\nclass NotFoundErrorBoundary extends _react.default.Component {\n static getDerivedStateFromError(error) {\n if ((error == null ? void 0 : error.digest) === \"NEXT_NOT_FOUND\") {\n return {\n notFoundTriggered: true\n };\n }\n // Re-throw if error is not for 404\n throw error;\n }\n static getDerivedStateFromProps(props, state) {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */ if (props.pathname !== state.previousPathname && state.notFoundTriggered) {\n return {\n notFoundTriggered: false,\n previousPathname: props.pathname\n };\n }\n return {\n notFoundTriggered: state.notFoundTriggered,\n previousPathname: props.pathname\n };\n }\n render() {\n if (this.state.notFoundTriggered) {\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(\"meta\", {\n name: \"robots\",\n content: \"noindex\"\n }), this.props.notFoundStyles, this.props.notFound);\n }\n return this.props.children;\n }\n constructor(props){\n super(props);\n this.state = {\n notFoundTriggered: !!props.asNotFound,\n previousPathname: props.pathname\n };\n }\n}\nfunction NotFoundBoundary(param) {\n let { notFound, notFoundStyles, asNotFound, children } = param;\n const pathname = (0, _navigation.usePathname)();\n return notFound ? /*#__PURE__*/ _react.default.createElement(NotFoundErrorBoundary, {\n pathname: pathname,\n notFound: notFound,\n notFoundStyles: notFoundStyles,\n asNotFound: asNotFound\n }, children) : /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, children);\n}\n_c = NotFoundBoundary;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=not-found-boundary.js.map\nvar _c;\n$RefreshReg$(_c, \"NotFoundBoundary\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9ub3QtZm91bmQtYm91bmRhcnkuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILG9EQ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KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bm90LWZvdW5kLWJvdW5kYXJ5LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJOb3RGb3VuZEJvdW5kYXJ5IiwiX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0IiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJfbmF2aWdhdGlvbiIsIk5vdEZvdW5kRXJyb3JCb3VuZGFyeSIsImRlZmF1bHQiLCJDb21wb25lbnQiLCJnZXREZXJpdmVkU3RhdGVGcm9tRXJyb3IiLCJlcnJvciIsImRpZ2VzdCIsIm5vdEZvdW5kVHJpZ2dlcmVkIiwiZ2V0RGVyaXZlZFN0YXRlRnJvbVByb3BzIiwicHJvcHMiLCJzdGF0ZSIsInBhdGhuYW1lIiwicHJldmlvdXNQYXRobmFtZSIsInJlbmRlciIsImNyZWF0ZUVsZW1lbnQiLCJGcmFnbWVudCIsIm5hbWUiLCJjb250ZW50Iiwibm90Rm91bmRTdHlsZXMiLCJub3RGb3VuZCIsImNoaWxkcmVuIiwiY29uc3RydWN0b3IiLCJhc05vdEZvdW5kIiwicGFyYW0iLCJ1c2VQYXRobmFtZSIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/not-found.js": /*!***************************************************************!*\ !*** ./node_modules/next/dist/client/components/not-found.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n notFound: function() {\n return notFound;\n },\n isNotFoundError: function() {\n return isNotFoundError;\n }\n});\nconst NOT_FOUND_ERROR_CODE = \"NEXT_NOT_FOUND\";\nfunction notFound() {\n // eslint-disable-next-line no-throw-literal\n const error = new Error(NOT_FOUND_ERROR_CODE);\n error.digest = NOT_FOUND_ERROR_CODE;\n throw error;\n}\nfunction isNotFoundError(error) {\n return (error == null ? void 0 : error.digest) === NOT_FOUND_ERROR_CODE;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=not-found.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9ub3QtZm91bmQuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FHTjtBQUNBLFNBQVNHLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlULE9BQU9DLGNBQWMsQ0FBQ08sUUFBUUUsTUFBTTtRQUNwREMsWUFBWTtRQUNaQyxLQUFLSCxHQUFHLENBQUNDLEtBQUs7SUFDbEI7QUFDSjtBQUNBSCxRQUFRTCxTQUFTO0lBQ2JHLFVBQVU7UUFDTixPQUFPQTtJQUNYO0lBQ0FDLGlCQUFpQjtRQUNiLE9BQU9BO0lB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VsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1ub3QtZm91bmQuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwibW9kdWxlIiwibm90Rm91bmQiLCJpc05vdEZvdW5kRXJyb3IiLCJfZXhwb3J0IiwidGFyZ2V0IiwiYWxsIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJOT1RfRk9VTkRfRVJST1JfQ09ERSIsImVycm9yIiwiRXJyb3IiLCJkaWdlc3QiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/not-found.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js": /*!*******************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js ***! \*******************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return HotReload;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _stripansi = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"(app-client)/./node_modules/next/dist/compiled/strip-ansi/index.js\"));\nconst _formatwebpackmessages = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! ../../dev/error-overlay/format-webpack-messages */ \"(app-client)/./node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js\"));\nconst _navigation = __webpack_require__(/*! ../navigation */ \"(app-client)/./node_modules/next/dist/client/components/navigation.js\");\nconst _erroroverlayreducer = __webpack_require__(/*! ./internal/error-overlay-reducer */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js\");\nconst _parseStack = __webpack_require__(/*! ./internal/helpers/parseStack */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parseStack.js\");\nconst _ReactDevOverlay = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! ./internal/ReactDevOverlay */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js\"));\nconst _useerrorhandler = __webpack_require__(/*! ./internal/helpers/use-error-handler */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js\");\nconst _usewebsocket = __webpack_require__(/*! ./internal/helpers/use-websocket */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js\");\nconst _parsecomponentstack = __webpack_require__(/*! ./internal/helpers/parse-component-stack */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js\");\nconst _notfound = __webpack_require__(/*! ../not-found */ \"(app-client)/./node_modules/next/dist/client/components/not-found.js\");\nconst _notfoundboundary = __webpack_require__(/*! ../not-found-boundary */ \"(app-client)/./node_modules/next/dist/client/components/not-found-boundary.js\");\nlet mostRecentCompilationHash = null;\nlet __nextDevClientId = Math.round(Math.random() * 100 + Date.now());\n// let startLatency = undefined\nfunction onBeforeFastRefresh(dispatcher, hasUpdates) {\n if (hasUpdates) {\n dispatcher.onBeforeRefresh();\n }\n}\nfunction onFastRefresh(dispatcher, hasUpdates) {\n dispatcher.onBuildOk();\n if (hasUpdates) {\n dispatcher.onRefresh();\n }\n}\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash) {\n // Update last known compilation hash.\n mostRecentCompilationHash = hash;\n}\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n /* globals __webpack_hash__ */ // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by Webpack.\n return mostRecentCompilationHash !== __webpack_require__.h();\n}\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n // @ts-expect-error module.hot exists\n return module.hot.status() === \"idle\";\n}\nfunction afterApplyUpdates(fn) {\n if (canApplyUpdates()) {\n fn();\n } else {\n function handler(status) {\n if (status === \"idle\") {\n // @ts-expect-error module.hot exists\n module.hot.removeStatusHandler(handler);\n fn();\n }\n }\n // @ts-expect-error module.hot exists\n module.hot.addStatusHandler(handler);\n }\n}\nfunction performFullReload(err, sendMessage) {\n const stackTrace = err && (err.stack && err.stack.split(\"\\n\").slice(0, 5).join(\"\\n\") || err.message || err + \"\");\n sendMessage(JSON.stringify({\n event: \"client-full-reload\",\n stackTrace,\n hadRuntimeError: !!_useerrorhandler.RuntimeErrorHandler.hadRuntimeError\n }));\n window.location.reload();\n}\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdates(onBeforeUpdate, onHotUpdateSuccess, sendMessage, dispatcher) {\n if (!isUpdateAvailable() || !canApplyUpdates()) {\n dispatcher.onBuildOk();\n return;\n }\n function handleApplyUpdates(err, updatedModules) {\n if (err || _useerrorhandler.RuntimeErrorHandler.hadRuntimeError || !updatedModules) {\n if (err) {\n console.warn(\"[Fast Refresh] performing full reload\\n\\n\" + \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" + \"You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n\" + \"Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n\" + \"It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n\" + \"Fast Refresh requires at least one parent function component in your React tree.\");\n } else if (_useerrorhandler.RuntimeErrorHandler.hadRuntimeError) {\n console.warn(\"[Fast Refresh] performing full reload because your application had an unrecoverable error\");\n }\n performFullReload(err, sendMessage);\n return;\n }\n const hasUpdates = Boolean(updatedModules.length);\n if (typeof onHotUpdateSuccess === \"function\") {\n // Maybe we want to do something.\n onHotUpdateSuccess(hasUpdates);\n }\n if (isUpdateAvailable()) {\n // While we were updating, there was a new update! Do it again.\n tryApplyUpdates(hasUpdates ? ()=>{} : onBeforeUpdate, hasUpdates ? ()=>dispatcher.onBuildOk() : onHotUpdateSuccess, sendMessage, dispatcher);\n } else {\n dispatcher.onBuildOk();\n if (false) {}\n }\n }\n // https://webpack.js.org/api/hot-module-replacement/#check\n // @ts-expect-error module.hot exists\n module.hot.check(/* autoApply */ false).then((updatedModules)=>{\n if (!updatedModules) {\n return null;\n }\n if (typeof onBeforeUpdate === \"function\") {\n const hasUpdates = Boolean(updatedModules.length);\n onBeforeUpdate(hasUpdates);\n }\n // https://webpack.js.org/api/hot-module-replacement/#apply\n // @ts-expect-error module.hot exists\n return module.hot.apply();\n }).then((updatedModules)=>{\n handleApplyUpdates(null, updatedModules);\n }, (err)=>{\n handleApplyUpdates(err, null);\n });\n}\nfunction processMessage(e, sendMessage, router, dispatcher) {\n let obj;\n try {\n obj = JSON.parse(e.data);\n } catch (e) {}\n if (!obj || !(\"action\" in obj)) {\n return;\n }\n function handleErrors(errors) {\n // \"Massage\" webpack messages.\n const formatted = (0, _formatwebpackmessages.default)({\n errors: errors,\n warnings: []\n });\n // Only show the first error.\n dispatcher.onBuildError(formatted.errors[0]);\n // Also log them to the console.\n for(let i = 0; i < formatted.errors.length; i++){\n console.error((0, _stripansi.default)(formatted.errors[i]));\n }\n // Do not attempt to reload now.\n // We will reload on next success instead.\n if (false) {}\n }\n switch(obj.action){\n case \"building\":\n {\n console.log(\"[Fast Refresh] rebuilding\");\n break;\n }\n case \"built\":\n case \"sync\":\n {\n if (obj.hash) {\n handleAvailableHash(obj.hash);\n }\n const { errors, warnings, versionInfo } = obj;\n // Is undefined when it's a 'built' event\n if (versionInfo) {\n dispatcher.onVersionInfo(versionInfo);\n }\n const hasErrors = Boolean(errors && errors.length);\n // Compilation with errors (e.g. syntax error or missing modules).\n if (hasErrors) {\n sendMessage(JSON.stringify({\n event: \"client-error\",\n errorCount: errors.length,\n clientId: __nextDevClientId\n }));\n handleErrors(errors);\n return;\n }\n const hasWarnings = Boolean(warnings && warnings.length);\n if (hasWarnings) {\n sendMessage(JSON.stringify({\n event: \"client-warning\",\n warningCount: warnings.length,\n clientId: __nextDevClientId\n }));\n // Compilation with warnings (e.g. ESLint).\n const isHotUpdate = obj.action !== \"sync\";\n // Print warnings to the console.\n const formattedMessages = (0, _formatwebpackmessages.default)({\n warnings: warnings,\n errors: []\n });\n for(let i = 0; i < formattedMessages.warnings.length; i++){\n if (i === 5) {\n console.warn(\"There were more warnings in other files.\\n\" + \"You can find a complete log in the terminal.\");\n break;\n }\n console.warn((0, _stripansi.default)(formattedMessages.warnings[i]));\n }\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onBeforeHotUpdate(hasUpdates) {\n onBeforeFastRefresh(dispatcher, hasUpdates);\n }, function onSuccessfulHotUpdate(hasUpdates) {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n onFastRefresh(dispatcher, hasUpdates);\n }, sendMessage, dispatcher);\n }\n return;\n }\n sendMessage(JSON.stringify({\n event: \"client-success\",\n clientId: __nextDevClientId\n }));\n const isHotUpdate = obj.action !== \"sync\" && (!window.__NEXT_DATA__ || window.__NEXT_DATA__.page !== \"/_error\") && isUpdateAvailable();\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onBeforeHotUpdate(hasUpdates) {\n onBeforeFastRefresh(dispatcher, hasUpdates);\n }, function onSuccessfulHotUpdate(hasUpdates) {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n onFastRefresh(dispatcher, hasUpdates);\n }, sendMessage, dispatcher);\n }\n return;\n }\n // TODO-APP: make server component change more granular\n case \"serverComponentChanges\":\n {\n sendMessage(JSON.stringify({\n event: \"server-component-reload-page\",\n clientId: __nextDevClientId\n }));\n if (_useerrorhandler.RuntimeErrorHandler.hadRuntimeError) {\n return window.location.reload();\n }\n (0, _react.startTransition)(()=>{\n // @ts-ignore it exists, it's just hidden\n router.fastRefresh();\n dispatcher.onRefresh();\n });\n if (false) {}\n return;\n }\n case \"reloadPage\":\n {\n sendMessage(JSON.stringify({\n event: \"client-reload-page\",\n clientId: __nextDevClientId\n }));\n return window.location.reload();\n }\n case \"removedPage\":\n {\n // TODO-APP: potentially only refresh if the currently viewed page was removed.\n // @ts-ignore it exists, it's just hidden\n router.fastRefresh();\n return;\n }\n case \"addedPage\":\n {\n // TODO-APP: potentially only refresh if the currently viewed page was added.\n // @ts-ignore it exists, it's just hidden\n router.fastRefresh();\n return;\n }\n case \"serverError\":\n {\n const { errorJSON } = obj;\n if (errorJSON) {\n const { message, stack } = JSON.parse(errorJSON);\n const error = new Error(message);\n error.stack = stack;\n handleErrors([\n error\n ]);\n }\n return;\n }\n case \"pong\":\n {\n const { invalid } = obj;\n if (invalid) {\n // Payload can be invalid even if the page does exist.\n // So, we check if it can be created.\n fetch(window.location.href, {\n credentials: \"same-origin\"\n }).then((pageRes)=>{\n if (pageRes.status === 200) {\n // Page exists now, reload\n (0, _react.startTransition)(()=>{\n // @ts-ignore it exists, it's just hidden\n router.fastRefresh();\n dispatcher.onRefresh();\n });\n } else if (pageRes.status === 404) {\n // We are still on the page,\n // dispatch an error so it's caught by the NotFound handler\n dispatcher.onNotFound();\n }\n });\n }\n return;\n }\n case \"devPagesManifestUpdate\":\n {\n return;\n }\n default:\n {\n throw new Error(\"Unexpected action \" + obj.action);\n }\n }\n}\nfunction HotReload(param) {\n let { assetPrefix, children, notFound, notFoundStyles, asNotFound } = param;\n const [state, dispatch] = (0, _react.useReducer)(_erroroverlayreducer.errorOverlayReducer, {\n nextId: 1,\n buildError: null,\n errors: [],\n notFound: false,\n refreshState: {\n type: \"idle\"\n },\n versionInfo: {\n installed: \"0.0.0\",\n staleness: \"unknown\"\n }\n });\n const dispatcher = (0, _react.useMemo)(()=>{\n return {\n onBuildOk () {\n dispatch({\n type: _erroroverlayreducer.ACTION_BUILD_OK\n });\n },\n onBuildError (message) {\n dispatch({\n type: _erroroverlayreducer.ACTION_BUILD_ERROR,\n message\n });\n },\n onBeforeRefresh () {\n dispatch({\n type: _erroroverlayreducer.ACTION_BEFORE_REFRESH\n });\n },\n onRefresh () {\n dispatch({\n type: _erroroverlayreducer.ACTION_REFRESH\n });\n },\n onVersionInfo (versionInfo) {\n dispatch({\n type: _erroroverlayreducer.ACTION_VERSION_INFO,\n versionInfo\n });\n },\n onNotFound () {\n dispatch({\n type: _erroroverlayreducer.ACTION_NOT_FOUND\n });\n }\n };\n }, [\n dispatch\n ]);\n const handleOnUnhandledError = (0, _react.useCallback)((error)=>{\n // Component stack is added to the error in use-error-handler in case there was a hydration errror\n const componentStack = error._componentStack;\n dispatch({\n type: _erroroverlayreducer.ACTION_UNHANDLED_ERROR,\n reason: error,\n frames: (0, _parseStack.parseStack)(error.stack),\n componentStackFrames: componentStack && (0, _parsecomponentstack.parseComponentStack)(componentStack)\n });\n }, []);\n const handleOnUnhandledRejection = (0, _react.useCallback)((reason)=>{\n dispatch({\n type: _erroroverlayreducer.ACTION_UNHANDLED_REJECTION,\n reason: reason,\n frames: (0, _parseStack.parseStack)(reason.stack)\n });\n }, []);\n const handleOnReactError = (0, _react.useCallback)((error)=>{\n // not found errors are handled by the parent boundary, not the dev overlay\n if ((0, _notfound.isNotFoundError)(error)) throw error;\n _useerrorhandler.RuntimeErrorHandler.hadRuntimeError = true;\n }, []);\n (0, _useerrorhandler.useErrorHandler)(handleOnUnhandledError, handleOnUnhandledRejection);\n const webSocketRef = (0, _usewebsocket.useWebsocket)(assetPrefix);\n (0, _usewebsocket.useWebsocketPing)(webSocketRef);\n const sendMessage = (0, _usewebsocket.useSendMessage)(webSocketRef);\n const router = (0, _navigation.useRouter)();\n (0, _react.useEffect)(()=>{\n const handler = (event)=>{\n try {\n processMessage(event, sendMessage, router, dispatcher);\n } catch (err) {\n var _err_stack;\n console.warn(\"[HMR] Invalid message: \" + event.data + \"\\n\" + ((_err_stack = err == null ? void 0 : err.stack) != null ? _err_stack : \"\"));\n }\n };\n const websocket = webSocketRef.current;\n if (websocket) {\n websocket.addEventListener(\"message\", handler);\n }\n return ()=>websocket && websocket.removeEventListener(\"message\", handler);\n }, [\n sendMessage,\n router,\n webSocketRef,\n dispatcher\n ]);\n return /*#__PURE__*/ _react.default.createElement(_notfoundboundary.NotFoundBoundary, {\n key: \"\" + state.notFound,\n notFound: notFound,\n notFoundStyles: notFoundStyles,\n asNotFound: asNotFound\n }, /*#__PURE__*/ _react.default.createElement(_ReactDevOverlay.default, {\n onReactError: handleOnReactError,\n state: state\n }, children));\n}\n_c = HotReload;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=hot-reloader-client.js.map\nvar _c;\n$RefreshReg$(_c, \"HotReload\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9ob3QtcmVs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FwiW0Zhc3QgUmVmcmVzaF0gcmVidWlsZGluZ1wiKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgY2FzZSBcImJ1aWx0XCI6XG4gICAgICAgIGNhc2UgXCJzeW5jXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWYgKG9iai5oYXNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZUF2YWlsYWJsZUhhc2gob2JqLmhhc2gpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCB7IGVycm9ycyAsIHdhcm5pbmdzICwgdmVyc2lvbkluZm8gIH0gPSBvYmo7XG4gICAgICAgICAgICAgICAgLy8gSXMgdW5kZWZpbmVkIHdoZW4gaXQncyBhICdidWlsdCcgZXZlbnRcbiAgICAgICAgICAgICAgICBpZiAodmVyc2lvbkluZm8pIHtcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2hlci5vblZlcnNpb25JbmZvKHZlcnNpb25JbmZvKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgaGFzRXJyb3JzID0gQm9vbGVhbihlcnJvcnMgJiYgZXJyb3JzLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgLy8gQ29tcGlsYXRpb24gd2l0aCBlcnJvcnMgKGUuZy4gc3ludGF4IGVycm9yIG9yIG1pc3NpbmcgbW9kdWxlcykuXG4gICAgICAgICAgICAgICAgaWYgKGhhc0Vycm9ycykge1xuICAgICAgICAgICAgICAgICAgICBzZW5kTWVzc2FnZShKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudDogXCJjbGllbnQtZXJyb3JcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yQ291bnQ6IGVycm9ycy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGllbnRJZDogX19uZXh0RGV2Q2xpZW50SWRcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBoYW5kbGVFcnJvcnMoZXJyb3JzKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBoYXNXYXJuaW5ncyA9IEJvb2xlYW4od2FybmluZ3MgJiYgd2FybmluZ3MubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAoaGFzV2FybmluZ3MpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VuZE1lc3NhZ2UoSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQ6IFwiY2xpZW50LXdhcm5pbmdcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHdhcm5pbmdDb3VudDogd2FybmluZ3MubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xpZW50SWQ6IF9fbmV4dERldkNsaWVudElkXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ29tcGlsYXRpb24gd2l0aCB3YXJuaW5ncyAoZS5nLiBFU0xpbnQpLlxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpc0hvdFVwZGF0ZSA9IG9iai5hY3Rpb24gIT09IFwic3luY1wiO1xuICAgICAgICAgICAgICAgICAgICAvLyBQcmludCB3YXJuaW5ncyB0byB0aGUgY29uc29sZS5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZm9ybWF0dGVkTWVzc2FnZXMgPSAoMCwgX2Zvcm1hdHdlYnBhY2ttZXNzYWdlcy5kZWZhdWx0KSh7XG4gICAgICAgICAgICAgICAgICAgICAgICB3YXJuaW5nczogd2FybmluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcnM6IFtdXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgZm9ybWF0dGVkTWVzc2FnZXMud2FybmluZ3MubGVuZ3RoOyBpKyspe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGkgPT09IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXCJUaGVyZSB3ZXJlIG1vcmUgd2FybmluZ3MgaW4gb3RoZXIgZmlsZXMuXFxuXCIgKyBcIllvdSBjYW4gZmluZCBhIGNvbXBsZXRlIGxvZyBpbiB0aGUgdGVybWluYWwuXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCgwLCBfc3RyaXBhbnNpLmRlZmF1bHQpKGZvcm1hdHRlZE1lc3NhZ2VzLndhcm5pbmdzW2ldKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gQXR0ZW1wdCB0byBhcHBseSBob3QgdXBkYXRlcyBvciByZWxvYWQuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0hvdFVwZGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5QXBwbHlVcGRhdGVzKGZ1bmN0aW9uIG9uQmVmb3JlSG90VXBkYXRlKGhhc1VwZGF0ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkJlZm9yZUZhc3RSZWZyZXNoKGRpc3BhdGNoZXIsIGhhc1VwZGF0ZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgZnVuY3Rpb24gb25TdWNjZXNzZnVsSG90VXBkYXRlKGhhc1VwZGF0ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmx5IGRpc21pc3MgaXQgd2hlbiB3ZSdyZSBzdXJlIGl0J3MgYSBob3QgdXBkYXRlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSBpdCB3b3VsZCBmbGlja2VyIHJpZ2h0IGJlZm9yZSB0aGUgcmVsb2FkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRmFzdFJlZnJlc2goZGlzcGF0Y2hlciwgaGFzVXBkYXRlcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBzZW5kTWVzc2FnZSwgZGlzcGF0Y2hlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzZW5kTWVzc2FnZShKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50OiBcImNsaWVudC1zdWNjZXNzXCIsXG4gICAgICAgICAgICAgICAgICAgIGNsaWVudElkOiBfX25leHREZXZDbGllbnRJZFxuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICBjb25zdCBpc0hvdFVwZGF0ZSA9IG9iai5hY3Rpb24gIT09IFwic3luY1wiICYmICghd2luZG93Ll9fTkVYVF9EQVRBX18gfHwgd2luZG93Ll9fTkVYVF9EQVRBX18ucGFnZSAhPT0gXCIvX2Vycm9yXCIpICYmIGlzVXBkYXRlQXZhaWxhYmxlKCk7XG4gICAgICAgICAgICAgICAgLy8gQXR0ZW1wdCB0byBhcHBseSBob3QgdXBkYXRlcyBvciByZWxvYWQuXG4gICAgICAgICAgICAgICAgaWYgKGlzSG90VXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRyeUFwcGx5VXBkYXRlcyhmdW5jdGlvbiBvbkJlZm9yZUhvdFVwZGF0ZShoYXNVcGRhdGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvbkJlZm9yZUZhc3RSZWZyZXNoKGRpc3BhdGNoZXIsIGhhc1VwZGF0ZXMpO1xuICAgICAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiBvblN1Y2Nlc3NmdWxIb3RVcGRhdGUoaGFzVXBkYXRlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBkaXNtaXNzIGl0IHdoZW4gd2UncmUgc3VyZSBpdCdzIGEgaG90IHVwZGF0ZS5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSBpdCB3b3VsZCBmbGlja2VyIHJpZ2h0IGJlZm9yZSB0aGUgcmVsb2FkLlxuICAgICAgICAgICAgICAgICAgICAgICAgb25GYXN0UmVmcmVzaChkaXNwYXRjaGVyLCBoYXNVcGRhdGVzKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgc2VuZE1lc3NhZ2UsIGRpc3BhdGNoZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIC8vIFRPRE8tQVBQOiBtYWtlIHNlcnZlciBjb21wb25lbnQgY2hhbmdlIG1vcmUgZ3JhbnVsYXJcbiAgICAgICAgY2FzZSBcInNlcnZlckNvbXBvbmVudENoYW5nZXNcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBzZW5kTWVzc2FnZShKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50OiBcInNlcnZlci1jb21wb25lbnQtcmVsb2FkLXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgY2xpZW50SWQ6IF9fbmV4dERldkNsaWVudElkXG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgIGlmIChfdXNlZXJyb3JoYW5kbGVyLlJ1bnRpbWVFcnJvckhhbmRsZXIuaGFkUnVudGltZUVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICgwLCBfcmVhY3Quc3RhcnRUcmFuc2l0aW9uKSgoKT0+e1xuICAgICAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlIGl0IGV4aXN0cywgaXQncyBqdXN0IGhpZGRlblxuICAgICAgICAgICAgICAgICAgICByb3V0ZXIuZmFzdFJlZnJlc2goKTtcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2hlci5vblJlZnJlc2goKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuX19ORVhUX1RFU1RfTU9ERSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5fX05FWFRfSE1SX0NCKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9fTkVYVF9ITVJfQ0IoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX19ORVhUX0hNUl9DQiA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICBjYXNlIFwicmVsb2FkUGFnZVwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQ6IFwiY2xpZW50LXJlbG9hZC1wYWdlXCIsXG4gICAgICAgICAgICAgICAgICAgIGNsaWVudElkOiBfX25leHREZXZDbGllbnRJZFxuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICBjYXNlIFwicmVtb3ZlZFBhZ2VcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPLUFQUDogcG90ZW50aWFsbHkgb25seSByZWZyZXNoIGlmIHRoZSBjdXJyZW50bHkgdmlld2VkIHBhZ2Ugd2FzIHJlbW92ZWQuXG4gICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZSBpdCBleGlzdHMsIGl0J3MganVzdCBoaWRkZW5cbiAgICAgICAgICAgICAgICByb3V0ZXIuZmFzdFJlZnJlc2goKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJhZGRlZFBhZ2VcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPLUFQUDogcG90ZW50aWFsbHkgb25seSByZWZyZXNoIGlmIHRoZSBjdXJyZW50bHkgdmlld2VkIHBhZ2Ugd2FzIGFkZGVkLlxuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmUgaXQgZXhpc3RzLCBpdCdzIGp1c3QgaGlkZGVuXG4gICAgICAgICAgICAgICAgcm91dGVyLmZhc3RSZWZyZXNoKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICBjYXNlIFwic2VydmVyRXJyb3JcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGVycm9ySlNPTiAgfSA9IG9iajtcbiAgICAgICAgICAgICAgICBpZiAoZXJyb3JKU09OKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbWVzc2FnZSAsIHN0YWNrICB9ID0gSlNPTi5wYXJzZShlcnJvckpTT04pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3Iuc3RhY2sgPSBzdGFjaztcbiAgICAgICAgICAgICAgICAgICAgaGFuZGxlRXJyb3JzKFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJwb25nXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBpbnZhbGlkICB9ID0gb2JqO1xuICAgICAgICAgICAgICAgIGlmIChpbnZhbGlkKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFBheWxvYWQgY2FuIGJlIGludmFsaWQgZXZlbiBpZiB0aGUgcGFnZSBkb2VzIGV4aXN0LlxuICAgICAgICAgICAgICAgICAgICAvLyBTbywgd2UgY2hlY2sgaWYgaXQgY2FuIGJlIGNyZWF0ZWQuXG4gICAgICAgICAgICAgICAgICAgIGZldGNoKHdpbmRvdy5sb2NhdGlvbi5ocmVmLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjcmVkZW50aWFsczogXCJzYW1lLW9yaWdpblwiXG4gICAgICAgICAgICAgICAgICAgIH0pLnRoZW4oKHBhZ2VSZXMpPT57XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFnZVJlcy5zdGF0dXMgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFBhZ2UgZXhpc3RzIG5vdywgcmVsb2FkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAsIF9yZWFjdC5zdGFydFRyYW5zaXRpb24pKCgpPT57XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmUgaXQgZXhpc3RzLCBpdCdzIGp1c3QgaGlkZGVuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlci5mYXN0UmVmcmVzaCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaGVyLm9uUmVmcmVzaCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYWdlUmVzLnN0YXR1cyA9PT0gNDA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgYXJlIHN0aWxsIG9uIHRoZSBwYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRpc3BhdGNoIGFuIGVycm9yIHNvIGl0J3MgY2F1Z2h0IGJ5IHRoZSBOb3RGb3VuZCBoYW5kbGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2hlci5vbk5vdEZvdW5kKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJkZXZQYWdlc01hbmlmZXN0VXBkYXRlXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlVuZXhwZWN0ZWQgYWN0aW9uIFwiICsgb2JqLmFjdGlvbik7XG4gICAgICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gSG90UmVsb2FkKHBhcmFtKSB7XG4gICAgbGV0IHsgYXNzZXRQcmVmaXggLCBjaGlsZHJlbiAsIG5vdEZvdW5kICwgbm90Rm91bmRTdHlsZXMgLCBhc05vdEZvdW5kICB9ID0gcGFyYW07XG4gICAgY29uc3QgW3N0YXRlLCBkaXNwYXRjaF0gPSAoMCwgX3JlYWN0LnVzZVJlZHVjZXIpKF9lcnJvcm92ZXJsYXlyZWR1Y2VyLmVycm9yT3ZlcmxheVJlZHVjZXIsIHtcbiAgICAgICAgbmV4dElkOiAxLFxuICAgICAgICBidWlsZEVycm9yOiBudWxsLFxuICAgICAgICBlcnJvcnM6IFtdLFxuICAgICAgICBub3RGb3VuZDogZmFsc2UsXG4gICAgICAgIHJlZnJlc2hTdGF0ZToge1xuICAgICAgICAgICAgdHlwZTogXCJpZGxlXCJcbiAgICAgICAgfSxcbiAgICAgICAgdmVyc2lvbkluZm86IHtcbiAgICAgICAgICAgIGluc3RhbGxlZDogXCIwLjAuMFwiLFxuICAgICAgICAgICAgc3RhbGVuZXNzOiBcInVua25vd25cIlxuICAgICAgICB9XG4gICAgfSk7XG4gICAgY29uc3QgZGlzcGF0Y2hlciA9ICgwLCBfcmVhY3QudXNlTWVtbykoKCk9PntcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG9uQnVpbGRPayAoKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBfZXJyb3JvdmVybGF5cmVkdWNlci5BQ1RJT05fQlVJTERfT0tcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbkJ1aWxkRXJyb3IgKG1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IF9lcnJvcm92ZXJsYXlyZWR1Y2VyLkFDVElPTl9CVUlMRF9FUlJPUixcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uQmVmb3JlUmVmcmVzaCAoKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBfZXJyb3JvdmVybGF5cmVkdWNlci5BQ1RJT05fQkVGT1JFX1JFRlJFU0hcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvblJlZnJlc2ggKCkge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogX2Vycm9yb3ZlcmxheXJlZHVjZXIuQUNUSU9OX1JFRlJFU0hcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvblZlcnNpb25JbmZvICh2ZXJzaW9uSW5mbykge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogX2Vycm9yb3ZlcmxheXJlZHVjZXIuQUNUSU9OX1ZFUlNJT05fSU5GTyxcbiAgICAgICAgICAgICAgICAgICAgdmVyc2lvbkluZm9cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbk5vdEZvdW5kICgpIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IF9lcnJvcm92ZXJsYXlyZWR1Y2VyLkFDVElPTl9OT1RfRk9VTkRcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9LCBbXG4gICAgICAgIGRpc3BhdGNoXG4gICAgXSk7XG4gICAgY29uc3QgaGFuZGxlT25VbmhhbmRsZWRFcnJvciA9ICgwLCBfcmVhY3QudXNlQ2FsbGJhY2spKChlcnJvcik9PntcbiAgICAgICAgLy8gQ29tcG9uZW50IHN0YWNrIGlzIGFkZGVkIHRvIHRoZSBlcnJvciBpbiB1c2UtZXJyb3ItaGFuZGxlciBpbiBjYXNlIHRoZXJlIHdhcyBhIGh5ZHJhdGlvbiBlcnJyb3JcbiAgICAgICAgY29uc3QgY29tcG9uZW50U3RhY2sgPSBlcnJvci5fY29tcG9uZW50U3RhY2s7XG4gICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgIHR5cGU6IF9lcnJvcm92ZXJsYXlyZWR1Y2VyLkFDVElPTl9VTkhBTkRMRURfRVJST1IsXG4gICAgICAgICAgICByZWFzb246IGVycm9yLFxuICAgICAgICAgICAgZnJhbWVzOiAoMCwgX3BhcnNlU3RhY2sucGFyc2VTdGFjaykoZXJyb3Iuc3RhY2spLFxuICAgICAgICAgICAgY29tcG9uZW50U3RhY2tGcmFtZXM6IGNvbX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2Vic29ja2V0IiwiY3VycmVudCIsImFkZEV2ZW50TGlzdGVuZXIiLCJyZW1vdmVFdmVudExpc3RlbmVyIiwiY3JlYXRlRWxlbWVudCIsIk5vdEZvdW5kQm91bmRhcnkiLCJrZXkiLCJvblJlYWN0RXJyb3IiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return _default;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _erroroverlayreducer = __webpack_require__(/*! ./error-overlay-reducer */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js\");\nconst _ShadowPortal = __webpack_require__(/*! ./components/ShadowPortal */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js\");\nconst _BuildError = __webpack_require__(/*! ./container/BuildError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js\");\nconst _Errors = __webpack_require__(/*! ./container/Errors */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js\");\nconst _RootLayoutError = __webpack_require__(/*! ./container/RootLayoutError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RootLayoutError.js\");\nconst _parseStack = __webpack_require__(/*! ./helpers/parseStack */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parseStack.js\");\nconst _Base = __webpack_require__(/*! ./styles/Base */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js\");\nconst _ComponentStyles = __webpack_require__(/*! ./styles/ComponentStyles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js\");\nconst _CssReset = __webpack_require__(/*! ./styles/CssReset */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js\");\nconst _notfound = __webpack_require__(/*! ../../not-found */ \"(app-client)/./node_modules/next/dist/client/components/not-found.js\");\nclass ReactDevOverlay extends _react.PureComponent {\n static getDerivedStateFromError(error) {\n const e = error;\n const event = {\n type: _erroroverlayreducer.ACTION_UNHANDLED_ERROR,\n reason: error,\n frames: (0, _parseStack.parseStack)(e.stack)\n };\n const errorEvent = {\n id: 0,\n event\n };\n return {\n reactError: errorEvent\n };\n }\n componentDidCatch(componentErr) {\n this.props.onReactError(componentErr);\n }\n render() {\n const { state, children } = this.props;\n const { reactError } = this.state;\n const hasBuildError = state.buildError != null;\n const hasRuntimeErrors = Boolean(state.errors.length);\n const rootLayoutMissingTagsError = state.rootLayoutMissingTagsError;\n const isMounted = hasBuildError || hasRuntimeErrors || reactError || rootLayoutMissingTagsError;\n if (state.notFound) {\n (0, _notfound.notFound)();\n }\n return /*#__PURE__*/ _react.createElement(_react.Fragment, null, reactError ? /*#__PURE__*/ _react.createElement(\"html\", null, /*#__PURE__*/ _react.createElement(\"head\", null), /*#__PURE__*/ _react.createElement(\"body\", null)) : children, isMounted ? /*#__PURE__*/ _react.createElement(_ShadowPortal.ShadowPortal, null, /*#__PURE__*/ _react.createElement(_CssReset.CssReset, null), /*#__PURE__*/ _react.createElement(_Base.Base, null), /*#__PURE__*/ _react.createElement(_ComponentStyles.ComponentStyles, null), rootLayoutMissingTagsError ? /*#__PURE__*/ _react.createElement(_RootLayoutError.RootLayoutError, {\n missingTags: rootLayoutMissingTagsError.missingTags\n }) : hasBuildError ? /*#__PURE__*/ _react.createElement(_BuildError.BuildError, {\n message: state.buildError,\n versionInfo: state.versionInfo\n }) : reactError ? /*#__PURE__*/ _react.createElement(_Errors.Errors, {\n versionInfo: state.versionInfo,\n initialDisplayState: \"fullscreen\",\n errors: [\n reactError\n ]\n }) : hasRuntimeErrors ? /*#__PURE__*/ _react.createElement(_Errors.Errors, {\n initialDisplayState: \"minimized\",\n errors: state.errors,\n versionInfo: state.versionInfo\n }) : undefined) : undefined);\n }\n constructor(...args){\n super(...args);\n this.state = {\n reactError: null\n };\n }\n}\nconst _default = ReactDevOverlay;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=ReactDevOverlay.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9SZWFjdERldk92ZXJsYXkuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDJDQUEwQztJQUN0Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDRCQUE0QkMsbUJBQU9BLENBQUMsMkhBQTBDO0FBQ3BGLE1BQU1DLFNBQVMsV0FBVyxHQUFHRiwwQkFBME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iLCJSb290TGF5b3V0RXJyb3IiLCJtaXNzaW5nVGFncyIsIkJ1aWxkRXJyb3IiLCJtZXNzYWdlIiwidmVyc2lvbkluZm8iLCJFcnJvcnMiLCJpbml0aWFsRGlzcGxheVN0YXRlIiwidW5kZWZpbmVkIiwiY29uc3RydWN0b3IiLCJhcmdzIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js": /*!***************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js ***! \***************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"CodeFrame\", ({\n enumerable: true,\n get: function() {\n return CodeFrame;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _anser = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/anser */ \"(app-client)/./node_modules/next/dist/compiled/anser/index.js\"));\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _stripansi = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"(app-client)/./node_modules/next/dist/compiled/strip-ansi/index.js\"));\nconst _stackframe = __webpack_require__(/*! ../../helpers/stack-frame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js\");\nconst _useopenineditor = __webpack_require__(/*! ../../helpers/use-open-in-editor */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js\");\nconst CodeFrame = function CodeFrame(param) {\n _s();\n let { stackFrame, codeFrame } = param;\n // Strip leading spaces out of the code frame:\n const formattedFrame = _react.useMemo(()=>{\n const lines = codeFrame.split(/\\r?\\n/g);\n const prefixLength = lines.map((line)=>/^>? +\\d+ +\\| [ ]+/.exec((0, _stripansi.default)(line)) === null ? null : /^>? +\\d+ +\\| ( *)/.exec((0, _stripansi.default)(line))).filter(Boolean).map((v)=>v.pop()).reduce((c, n)=>isNaN(c) ? n.length : Math.min(c, n.length), NaN);\n if (prefixLength > 1) {\n const p = \" \".repeat(prefixLength);\n return lines.map((line, a)=>~(a = line.indexOf(\"|\")) ? line.substring(0, a) + line.substring(a).replace(p, \"\") : line).join(\"\\n\");\n }\n return lines.join(\"\\n\");\n }, [\n codeFrame\n ]);\n const decoded = _react.useMemo(()=>{\n return _anser.default.ansiToJson(formattedFrame, {\n json: true,\n use_classes: true,\n remove_empty: true\n });\n }, [\n formattedFrame\n ]);\n const open = (0, _useopenineditor.useOpenInEditor)({\n file: stackFrame.file,\n lineNumber: stackFrame.lineNumber,\n column: stackFrame.column\n });\n // TODO: make the caret absolute\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-codeframe\": true\n }, /*#__PURE__*/ _react.createElement(\"div\", null, /*#__PURE__*/ _react.createElement(\"p\", {\n role: \"link\",\n onClick: open,\n tabIndex: 1,\n title: \"Click to open in your editor\"\n }, /*#__PURE__*/ _react.createElement(\"span\", null, (0, _stackframe.getFrameSource)(stackFrame), \" @ \", stackFrame.methodName), /*#__PURE__*/ _react.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/ _react.createElement(\"path\", {\n d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n }), /*#__PURE__*/ _react.createElement(\"polyline\", {\n points: \"15 3 21 3 21 9\"\n }), /*#__PURE__*/ _react.createElement(\"line\", {\n x1: \"10\",\n y1: \"14\",\n x2: \"21\",\n y2: \"3\"\n })))), /*#__PURE__*/ _react.createElement(\"pre\", null, decoded.map((entry, index)=>/*#__PURE__*/ _react.createElement(\"span\", {\n key: \"frame-\" + index,\n style: {\n color: entry.fg ? \"var(--color-\" + entry.fg + \")\" : undefined,\n ...entry.decoration === \"bold\" ? {\n fontWeight: 800\n } : entry.decoration === \"italic\" ? {\n fontStyle: \"italic\"\n } : undefined\n }\n }, entry.content))));\n};\n_s(CodeFrame, \"4Gt+UceGaRqMOFv99GzJu8D2nx8=\");\n_c = CodeFrame;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=CodeFrame.js.map\nvar _c;\n$RefreshReg$(_c, \"CodeFrame\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0NvZGVGcmFtZS9Db2RlRnJhbWUuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw2Q0FBNEM7SUFDeENJL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iwiX3N0YWNrZnJhbWUiLCJfdXNlb3BlbmluZWRpdG9yIiwicGFyYW0iLCJzdGFja0ZyYW1lIiwiY29kZUZyYW1lIiwiZm9ybWF0dGVkRnJhbWUiLCJ1c2VNZW1vIiwibGluZXMiLCJzcGxpdCIsInByZWZpeExlbmd0aCIsIm1hcCIsImxpbmUiLCJleGVjIiwiZGVmYXVsdCIsImZpbHRlciIsIkJvb2xlYW4iLCJ2IiwicG9wIiwicmVkdWNlIiwiYyIsIm4iLCJpc05hTiIsImxlbmd0aCIsIk1hdGgiLCJtaW4iLCJOYU4iLCJwIiwicmVwZWF0IiwiYSIsImluZGV4T2YiLCJzdWJzdHJpbmciLCJyZXBsYWNlIiwiam9pbiIsImRlY29kZWQiLCJhbnNpVG9Kc29uIiwianNvbiIsInVzZV9jbGFzc2VzIiwicmVtb3ZlX2VtcHR5Iiwib3BlbiIsInVzZU9wZW5JbkVkaXRvciIsImZpbGUiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwiY3JlYXRlRWxlbWVudCIsInJvbGUiLCJvbkNsaWNrIiwidGFiSW5kZXgiLCJ0aXRsZSIsImdldEZyYW1lU291cmNlIiwibWV0aG9kTmFtZSIsInhtbG5zIiwidmlld0JveCIsImZpbGwiLCJzdHJva2UiLCJzdHJva2VXaWR0aCIsInN0cm9rZUxpbmVjYXAiLCJzdHJva2VMaW5lam9pbiIsImQiLCJwb2ludHMiLCJ4MSIsInkxIiwieDIiLCJ5MiIsImVudHJ5IiwiaW5kZXgiLCJrZXkiLCJzdHlsZSIsImNvbG9yIiwiZmciLCJ1bmRlZmluZWQiLCJkZWNvcmF0aW9uIiwiZm9udFdlaWdodCIsImZvbnRTdHlsZSIsImNvbnRlbnQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js": /*!***********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js ***! \***********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"CodeFrame\", ({\n enumerable: true,\n get: function() {\n return _CodeFrame.CodeFrame;\n }\n}));\nconst _CodeFrame = __webpack_require__(/*! ./CodeFrame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0NvZGVGcmFtZS9pbmRleC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsNkNBQTRDO0lBQ3hDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQyxXQUFXQyxTQUFTO0lBQy9CO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUQsYUFBYUUsbUJBQU9BLENBQUMseUlBQWE7QUFFeEMsSUFBSSxDQUFDLE9BQU9OLFFBQVFPLE9BQU8sS0FBSyxjQUFlLE9BQU9QLFFBQVFPLE9BQU8sS0FBSyxZQUFZUCxRQUFRTyx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gPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsIl9Db2RlRnJhbWUiLCJDb2RlRnJhbWUiLCJyZXF1aXJlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js": /*!************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js ***! \************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-codeframe] {\\n overflow: auto;\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-codeframe]::selection,\\n [data-nextjs-codeframe] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-codeframe] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n\\n [data-nextjs-codeframe] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n [data-nextjs-codeframe] > div {\\n display: inline-block;\\n width: auto;\\n min-width: 100%;\\n border-bottom: 1px solid var(--color-ansi-bright-black);\\n }\\n [data-nextjs-codeframe] > div > p {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n cursor: pointer;\\n margin: 0;\\n }\\n [data-nextjs-codeframe] > div > p:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-codeframe] div > p > svg {\\n width: auto;\\n height: 1em;\\n margin-left: 8px;\\n }\\n [data-nextjs-codeframe] div > pre {\\n overflow: hidden;\\n display: inline-block;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0NvZGVGcmFtZS9zdHlsZXMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Q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lyZSIsIl9ub29wdGVtcGxhdGUiLCJfdGVtcGxhdGVPYmplY3QiLCJkYXRhIiwiXyIsIm5vb3AiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js": /*!*********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js ***! \*********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Dialog\", ({\n enumerable: true,\n get: function() {\n return Dialog;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _useonclickoutside = __webpack_require__(/*! ../../hooks/use-on-click-outside */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js\");\nconst Dialog = function Dialog(param) {\n _s();\n let { children, type, onClose, ...props } = param;\n const [dialog, setDialog] = _react.useState(null);\n const onDialog = _react.useCallback((node)=>{\n setDialog(node);\n }, []);\n (0, _useonclickoutside.useOnClickOutside)(dialog, onClose);\n // Make HTMLElements with `role=link` accessible to be triggered by the\n // keyboard, i.e. [Enter].\n _react.useEffect(()=>{\n if (dialog == null) {\n return;\n }\n const root = dialog.getRootNode();\n // Always true, but we do this for TypeScript:\n if (!(root instanceof ShadowRoot)) {\n return;\n }\n const shadowRoot = root;\n function handler(e) {\n const el = shadowRoot.activeElement;\n if (e.key === \"Enter\" && el instanceof HTMLElement && el.getAttribute(\"role\") === \"link\") {\n e.preventDefault();\n e.stopPropagation();\n el.click();\n }\n }\n shadowRoot.addEventListener(\"keydown\", handler);\n return ()=>shadowRoot.removeEventListener(\"keydown\", handler);\n }, [\n dialog\n ]);\n return /*#__PURE__*/ _react.createElement(\"div\", {\n ref: onDialog,\n \"data-nextjs-dialog\": true,\n tabIndex: -1,\n role: \"dialog\",\n \"aria-labelledby\": props[\"aria-labelledby\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-modal\": \"true\"\n }, /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-banner\": true,\n className: \"banner-\" + type\n }), children);\n};\n_s(Dialog, \"4L2rfwuY7w9H20nFAMz8U3oDnLU=\");\n_c = Dialog;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Dialog.js.map\nvar _c;\n$RefreshReg$(_c, \"Dialog\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9EaWFsb2cuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCwwQ0FBeUM7SUFDckNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyw0QkFBNEJDLG1CQUFPQSxDQUFDLDJIQUEwQ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PSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPURpYWxvZy5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiRGlhbG9nIiwiX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfIiwiX3VzZW9uY2xpY2tvdXRzaWRlIiwicGFyYW0iLCJjaGlsZHJlbiIsInR5cGUiLCJvbkNsb3NlIiwicHJvcHMiLCJkaWFsb2ciLCJzZXREaWFsb2ciLCJ1c2VTdGF0ZSIsIm9uRGlhbG9nIiwidXNlQ2FsbGJhY2siLCJub2RlIiwidXNlT25DbGlja091dHNpZGUiLCJ1c2VFZmZlY3QiLCJyb290IiwiZ2V0Um9vdE5vZGUiLCJTaGFkb3dSb290Iiwic2hhZG93Um9vdCIsImhhbmRsZXIiLCJlIiwiZWwiLCJhY3RpdmVFbGVtZW50Iiwia2V5IiwiSFRNTEVsZW1lbnQiLCJnZXRBdHRyaWJ1dGUiLCJwcmV2ZW50RGVmYXVsdCIsInN0b3BQcm9wYWdhdGlvbiIsImNsaWNrIiwiYWRkRXZlbnRMaXN0ZW5lciIsInJlbW92ZUV2ZW50TGlzdGVuZXIiLCJjcmVhdGVFbGVtZW50IiwicmVmIiwidGFiSW5kZXgiLCJyb2xlIiwiY2xhc3NOYW1lIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js": /*!*************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js ***! \*************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"DialogBody\", ({\n enumerable: true,\n get: function() {\n return DialogBody;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst DialogBody = function DialogBody(param) {\n let { children, className } = param;\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-body\": true,\n className: className\n }, children);\n};\n_c = DialogBody;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=DialogBody.js.map\nvar _c;\n$RefreshReg$(_c, \"DialogBody\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9EaWFsb2dCb2R5LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw4Q0FBNkM7SUFDekNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyw0QkFBNEJDLG1CQUFPQSxDQUFDLDJIQUEwQztBQUNwRixN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4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9RGlhbG9nQm9keS5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiRGlhbG9nQm9keSIsIl9pbnRlcm9wX3JlcXVpcmVfd2lsZGNhcmQiLCJyZXF1aXJlIiwiX3JlYWN0IiwiXyIsInBhcmFtIiwiY2hpbGRyZW4iLCJjbGFzc05hbWUiLCJjcmVhdGVFbGVtZW50IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js": /*!****************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js ***! \****************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"DialogContent\", ({\n enumerable: true,\n get: function() {\n return DialogContent;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst DialogContent = function DialogContent(param) {\n let { children, className } = param;\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-content\": true,\n className: className\n }, children);\n};\n_c = DialogContent;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=DialogContent.js.map\nvar _c;\n$RefreshReg$(_c, \"DialogContent\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9EaWFsb2dDb250ZW50LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxpREFBZ0Q7SUFDNUNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyw0QkFBNEJDLG1CQUFPQSxDQUFDLDJIQUEwQztBQUNwRixNQUFNQyxTQUFTLFdBQVcsR0FBR0YsMEJBQTBCRyxDQUFDLENBQUNGLG1CQUFPQSxDQUFDLDRFQUFPO0FBQ3hFLE1BQU1GLGdCQUFnQixTQUFTQSxjQUFjSyxLQUFLO0lBQzlDLElBQUksRUFBRUMsUUFBUSxFQUFHQyxTQUFTLEVBQUcsR0FBR0Y7SUFDaEMsT0FBTyxXQUFXLEdBQUdGLE9BQU9LLGFBQWEsQ0FBQyxPQUFPO1FBQzdDLDhCQUE4QjtRQUM5QkQsV0FBV0E7SUFDZixHQUFHRDtBQUNQO0tBTk1OO0FBUU4sSUFBSSxDQUFDLE9BQU9KLFFBQVFhLE9BQU8sS0FBSyxjQUFlLE9BQU9iLFFBQVFhLE9BQU8sS0FBSyxZQUFZYixRQUFRYSxPQUFPLEtBQUssSUFBSS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lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js": /*!***************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js ***! \***************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"DialogHeader\", ({\n enumerable: true,\n get: function() {\n return DialogHeader;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst DialogHeader = function DialogHeader(param) {\n let { children, className } = param;\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-header\": true,\n className: className\n }, children);\n};\n_c = DialogHeader;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=DialogHeader.js.map\nvar _c;\n$RefreshReg$(_c, \"DialogHeader\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9EaWFsb2dIZWFkZXIuanMiL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ICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1EaWFsb2dIZWFkZXIuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsIkRpYWxvZ0hlYWRlciIsIl9pbnRlcm9wX3JlcXVpcmVfd2lsZGNhcmQiLCJyZXF1aXJlIiwiX3JlYWN0IiwiXyIsInBhcmFtIiwiY2hpbGRyZW4iLCJjbGFzc05hbWUiLCJjcmVhdGVFbGVtZW50IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js": /*!********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js ***! \********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n Dialog: function() {\n return _Dialog.Dialog;\n },\n DialogBody: function() {\n return _DialogBody.DialogBody;\n },\n DialogContent: function() {\n return _DialogContent.DialogContent;\n },\n DialogHeader: function() {\n return _DialogHeader.DialogHeader;\n },\n styles: function() {\n return _styles.styles;\n }\n});\nconst _Dialog = __webpack_require__(/*! ./Dialog */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js\");\nconst _DialogBody = __webpack_require__(/*! ./DialogBody */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js\");\nconst _DialogContent = __webpack_require__(/*! ./DialogContent */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js\");\nconst _DialogHeader = __webpack_require__(/*! ./DialogHeader */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js\");\nconst _styles = __webpack_require__(/*! ./styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9pbmRleC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQU1OO0FBQ0EsU0FBU00sUUFBUUMsTUFBTSxFQUFFQyxHQ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SIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsIkRpYWxvZyIsIkRpYWxvZ0JvZHkiLCJEaWFsb2dDb250ZW50IiwiRGlhbG9nSGVhZGVyIiwic3R5bGVzIiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiX0RpYWxvZyIsIl9EaWFsb2dCb2R5IiwiX0RpYWxvZ0NvbnRlbnQiLCJfRGlhbG9nSGVhZGVyIiwiX3N0eWxlcyIsInJlcXVpcmUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js": /*!*********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js ***! \*********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-dialog] {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n margin-right: auto;\\n margin-left: auto;\\n outline: none;\\n background: white;\\n border-radius: var(--size-gap);\\n box-shadow: 0 var(--size-gap-half) var(--size-gap-double)\\n rgba(0, 0, 0, 0.25);\\n max-height: calc(100% - 56px);\\n overflow-y: hidden;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n max-height: calc(100% - 15px);\\n }\\n }\\n\\n @media (min-width: 576px) {\\n [data-nextjs-dialog] {\\n max-width: 540px;\\n box-shadow: 0 var(--size-gap) var(--size-gap-quad) rgba(0, 0, 0, 0.25);\\n }\\n }\\n\\n @media (min-width: 768px) {\\n [data-nextjs-dialog] {\\n max-width: 720px;\\n }\\n }\\n\\n @media (min-width: 992px) {\\n [data-nextjs-dialog] {\\n max-width: 960px;\\n }\\n }\\n\\n [data-nextjs-dialog-banner] {\\n position: relative;\\n }\\n [data-nextjs-dialog-banner].banner-warning {\\n border-color: var(--color-ansi-yellow);\\n }\\n [data-nextjs-dialog-banner].banner-error {\\n border-color: var(--color-ansi-red);\\n }\\n\\n [data-nextjs-dialog-banner]::after {\\n z-index: 2;\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 100%;\\n /* banner width: */\\n border-top-width: var(--size-gap-half);\\n border-bottom-width: 0;\\n border-top-style: solid;\\n border-bottom-style: solid;\\n border-top-color: inherit;\\n border-bottom-color: transparent;\\n }\\n\\n [data-nextjs-dialog-content] {\\n overflow-y: auto;\\n border: none;\\n margin: 0;\\n /* calc(padding + banner width offset) */\\n padding: calc(var(--size-gap-double) + var(--size-gap-half))\\n var(--size-gap-double);\\n height: 100%;\\n display: flex;\\n flex-direction: column;\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\\n flex-shrink: 0;\\n margin-bottom: var(--size-gap-double);\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\\n position: relative;\\n flex: 1 1 auto;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0RpYWxvZy9zdHlsZXMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDBDQUF5QztJQUNyQ0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLGlDQUFpQ0MsbUJBQU9BLENBQUMscUlBQStDO0FBQzlGLE1BQU1DLGdCQUFnQkQsbUJBQU9BLENBQUMsZ0pBQTZCO0FBQzNELFNBQVNFO0lBQ0wsTUFBTUMsT0FBT0osK0JBQStCSyxDQUFDLENBQUM7UUFDMUM7S0FDSDtJQUNERixrQkFBa0I7UUFDZCxPQUFPQztJQUNYO0lBQ0EsT0FBT0E7QUFDWDtBQUNBLE1BQU1MLFNBQVMsQ0FBQyxHQUFHRyxjQUFjSSxJQUFJLEVBQUVIO0FBRXZDLElBQUksQ0FBQyxPQUFPUixRQUFRWSxPQUFPLEtBQUssY0FBZSxPQUFPWixRQUFRWSxPQUFPLEtBQUssWUFBWVosUUFBUVksT0FBTyxLQUFLLElBQUksS0FBTSxPQUFPWixRQUFRWSxPQUFPLENBQUNDLFVBQVUsS0FBSyxhQUFhO0lBQ3JLZixPQUFPQyxjQUFjLENBQUNDLFFBQVFZLE9BQU8sRUFBRSxjQUFjO1FBQUVYLE9BQU87SUFBSztJQUNuRUgsT0FBT2dCLE1BQU0sQ0FBQ2QsUUFBUVksT0FBTyxFQUFFWjt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4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdHlsZXMuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsInN0eWxlcyIsIl90YWdnZWRfdGVtcGxhdGVfbGl0ZXJhbF9sb29zZSIsInJlcXVpcmUiLCJfbm9vcHRlbXBsYXRlIiwiX3RlbXBsYXRlT2JqZWN0IiwiZGF0YSIsIl8iLCJub29wIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js": /*!***************************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js ***! \***************************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"LeftRightDialogHeader\", ({\n enumerable: true,\n get: function() {\n return LeftRightDialogHeader;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _CloseIcon = __webpack_require__(/*! ../../icons/CloseIcon */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js\");\nconst LeftRightDialogHeader = function LeftRightDialogHeader(param) {\n _s();\n let { children, className, previous, next, close } = param;\n const buttonLeft = _react.useRef(null);\n const buttonRight = _react.useRef(null);\n const buttonClose = _react.useRef(null);\n const [nav, setNav] = _react.useState(null);\n const onNav = _react.useCallback((el)=>{\n setNav(el);\n }, []);\n _react.useEffect(()=>{\n if (nav == null) {\n return;\n }\n const root = nav.getRootNode();\n const d = self.document;\n function handler(e) {\n if (e.key === \"ArrowLeft\") {\n e.stopPropagation();\n if (buttonLeft.current) {\n buttonLeft.current.focus();\n }\n previous && previous();\n } else if (e.key === \"ArrowRight\") {\n e.stopPropagation();\n if (buttonRight.current) {\n buttonRight.current.focus();\n }\n next && next();\n } else if (e.key === \"Escape\") {\n e.stopPropagation();\n if (root instanceof ShadowRoot) {\n const a = root.activeElement;\n if (a && a !== buttonClose.current && a instanceof HTMLElement) {\n a.blur();\n return;\n }\n }\n if (close) {\n close();\n }\n }\n }\n root.addEventListener(\"keydown\", handler);\n if (root !== d) {\n d.addEventListener(\"keydown\", handler);\n }\n return function() {\n root.removeEventListener(\"keydown\", handler);\n if (root !== d) {\n d.removeEventListener(\"keydown\", handler);\n }\n };\n }, [\n close,\n nav,\n next,\n previous\n ]);\n // Unlock focus for browsers like Firefox, that break all user focus if the\n // currently focused item becomes disabled.\n _react.useEffect(()=>{\n if (nav == null) {\n return;\n }\n const root = nav.getRootNode();\n // Always true, but we do this for TypeScript:\n if (root instanceof ShadowRoot) {\n const a = root.activeElement;\n if (previous == null) {\n if (buttonLeft.current && a === buttonLeft.current) {\n buttonLeft.current.blur();\n }\n } else if (next == null) {\n if (buttonRight.current && a === buttonRight.current) {\n buttonRight.current.blur();\n }\n }\n }\n }, [\n nav,\n next,\n previous\n ]);\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-left-right\": true,\n className: className\n }, /*#__PURE__*/ _react.createElement(\"nav\", {\n ref: onNav\n }, /*#__PURE__*/ _react.createElement(\"button\", {\n ref: buttonLeft,\n type: \"button\",\n disabled: previous == null ? true : undefined,\n \"aria-disabled\": previous == null ? true : undefined,\n onClick: previous != null ? previous : undefined\n }, /*#__PURE__*/ _react.createElement(\"svg\", {\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, /*#__PURE__*/ _react.createElement(\"title\", null, \"previous\"), /*#__PURE__*/ _react.createElement(\"path\", {\n d: \"M6.99996 1.16666L1.16663 6.99999L6.99996 12.8333M12.8333 6.99999H1.99996H12.8333Z\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }))), /*#__PURE__*/ _react.createElement(\"button\", {\n ref: buttonRight,\n type: \"button\",\n disabled: next == null ? true : undefined,\n \"aria-disabled\": next == null ? true : undefined,\n onClick: next != null ? next : undefined\n }, /*#__PURE__*/ _react.createElement(\"svg\", {\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, /*#__PURE__*/ _react.createElement(\"title\", null, \"next\"), /*#__PURE__*/ _react.createElement(\"path\", {\n d: \"M6.99996 1.16666L12.8333 6.99999L6.99996 12.8333M1.16663 6.99999H12H1.16663Z\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }))), \"\\xa0\", children), close ? /*#__PURE__*/ _react.createElement(\"button\", {\n \"data-nextjs-errors-dialog-left-right-close-button\": true,\n ref: buttonClose,\n type: \"button\",\n onClick: close,\n \"aria-label\": \"Close\"\n }, /*#__PURE__*/ _react.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ _react.createElement(_CloseIcon.CloseIcon, null))) : null);\n};\n_s(LeftRightDialogHeader, \"BTIclYWDjFVmQ0IbTZR6SGMkDDk=\");\n_c = LeftRightDialogHeader;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=LeftRightDialogHeader.js.map\nvar _c;\n$RefreshReg$(_c, \"LeftRightDialogHeader\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0xlZnRSaWdodERpYWxvZ0hlYWRlci9MZWZ0UmlnaHREaWFsb2dIZWFkZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCx5REFBd0Q7SUFDcERJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyw0QkFBNEJDLG1CQUFPQSxDQUFDLDJIQUEwQztBQUNwRixNQUFNQyxTQUFTLFdBQVcsR0FBR0YsMEJBQTBCRyxDQUFDLENBQUNGLG1CQUFPQSxDQUFDLDRFQUFPO0FBQ3hFLE1BQU1HLGFBQWFILG1CQUFPQSxDQUFDLG9JQUF1QjtBQUNsRCxNQUFNRix3QkFBd0IsU0FBU0Esc0JBQXNCTSxLQUFLOztJQUM5RCxJQUFJLEVBQUVDLFFBQVEsRUFBR0MsU0FBUyxFQUFHQyxRQUFRLEVBQUdDLElBQUksRUFBR0MsS0FBSyxFQUFHLEdBQUdMO0lBQzFELE1BQU1NLGFBQWFULE9BQU9VLE1BQU0sQ0FBQztJQUNqQyxNQUFNQyxjQUFjWCxPQUFPVSxNQUFNLENBQUM7SUFDbEMsTUFBTUUsY0FBY1osT0FBT1UsTU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2V0TmF2XSA9IF9yZWFjdC51c2VTdGF0ZShudWxsKTtcbiAgICBjb25zdCBvbk5hdiA9IF9yZWFjdC51c2VDYWxsYmFjaygoZWwpPT57XG4gICAgICAgIHNldE5hdihlbCk7XG4gICAgfSwgW10pO1xuICAgIF9yZWFjdC51c2VFZmZlY3QoKCk9PntcbiAgICAgICAgaWYgKG5hdiA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgcm9vdCA9IG5hdi5nZXRSb290Tm9kZSgpO1xuICAgICAgICBjb25zdCBkID0gc2VsZi5kb2N1bWVudDtcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlcihlKSB7XG4gICAgICAgICAgICBpZiAoZS5rZXkgPT09IFwiQXJyb3dMZWZ0XCIpIHtcbiAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgIGlmIChidXR0b25MZWZ0LmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYnV0dG9uTGVmdC5jdXJyZW50LmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHByZXZpb3VzICYmIHByZXZpb3VzKCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGUua2V5ID09PSBcIkFycm93UmlnaHRcIikge1xuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgaWYgKGJ1dHRvblJpZ2h0LmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYnV0dG9uUmlnaHQuY3VycmVudC5mb2N1cygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuZXh0ICYmIG5leHQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZS5rZXkgPT09IFwiRXNjYXBlXCIpIHtcbiAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgIGlmIChyb290IGluc3RhbmNlb2YgU2hhZG93Um9vdCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBhID0gcm9vdC5hY3RpdmVFbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICBpZiAoYSAmJiBhICE9PSBidXR0b25DbG9zZS5jdXJyZW50ICYmIGEgaW5zdGFuY2VvZiBIVE1MRWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYS5ibHVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNsb3NlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsb3NlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJvb3QuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgaGFuZGxlcik7XG4gICAgICAgIGlmIChyb290ICE9PSBkKSB7XG4gICAgICAgICAgICBkLmFkZEV2ZW50TGlzdGVuZXIoXCJrZXlkb3duXCIsIGhhbmRsZXIpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJvb3QucmVtb3ZlRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgaGFuZGxlcik7XG4gICAgICAgICAgICBpZiAocm9vdCAhPT0gZCkge1xuICAgICAgICAgICAgICAgIGQucmVtb3ZlRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgaGFuZGxlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSwgW1xuICAgICAgICBjbG9zZSxcbiAgICAgICAgbmF2LFxuICAgICAgICBuZXh0LFxuICAgICAgICBwcmV2aW91c1xuICAgIF0pO1xuICAgIC8vIFVubG9jayBmb2N1cyBmb3IgYnJvd3NlcnMgbGlrZSBGaXJlZm94LCB0aGF0IGJyZWFrIGFsbCB1c2VyIGZvY3VzIGlmIHRoZVxuICAgIC8vIGN1cnJlbnRseSBmb2N1c2VkIGl0ZW0gYmVjb21lcyBkaXNhYmxlZC5cbiAgICBfcmVhY3QudXNlRWZmZWN0KCgpPT57XG4gICAgICAgIGlmIChuYXYgPT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHJvb3QgPSBuYXYuZ2V0Um9vdE5vZGUoKTtcbiAgICAgICAgLy8gQWx3YXlzIHRydWUsIGJ1dCB3ZSBkbyB0aGlzIGZvciBUeXBlU2NyaXB0OlxuICAgICAgICBpZiAocm9vdCBpbnN0YW5jZW9mIFNoYWRvd1Jvb3QpIHtcbiAgICAgICAgICAgIGNvbnN0IGEgPSByb290LmFjdGl2ZUVsZW1lbnQ7XG4gICAgICAgICAgICBpZiAocHJldmlvdXMgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmIChidXR0b25MZWZ0LmN1cnJlbnQgJiYgYSA9PT0gYnV0dG9uTGVmdC5jdXJyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbkxlZnQuY3VycmVudC5ibHVyKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChuZXh0ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAoYnV0dG9uUmlnaHQuY3VycmVudCAmJiBhID09PSBidXR0b25SaWdodC5jdXJyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvblJpZ2h0LmN1cnJlbnQuYmx1cigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIFtcbiAgICAgICAgbmF2LFxuICAgICAgICBuZXh0LFxuICAgICAgICBwcmV2aW91c1xuICAgIF0pO1xuICAgIHJldHVybiAvKiNfX1BVUkVfXyovIF9yZWFjdC5jcmVhdGV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iYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js": /*!***********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js ***! \***********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n LeftRightDialogHeader: function() {\n return _LeftRightDialogHeader.LeftRightDialogHeader;\n },\n styles: function() {\n return _styles.styles;\n }\n});\nconst _LeftRightDialogHeader = __webpack_require__(/*! ./LeftRightDialogHeader */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js\");\nconst _styles = __webpack_require__(/*! ./styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0xlZnRSaWdodERpYWxvZ0hlYWRlci9pbmRleC5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A9PT0gJ29iamVjdCcgJiYgZXhwb3J0cy5kZWZhdWx0ICE9PSBudWxsKSkgJiYgdHlwZW9mIGV4cG9ydHMuZGVmYXVsdC5fX2VzTW9kdWxlID09PSAndW5kZWZpbmVkJykge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsIkxlZnRSaWdodERpYWxvZ0hlYWRlciIsInN0eWxlcyIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9MZWZ0UmlnaHREaWFsb2dIZWFkZXIiLCJfc3R5bGVzIiwicmVxdWlyZSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js": /*!************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js ***! \************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-dialog-left-right] {\\n display: flex;\\n flex-direction: row;\\n align-content: center;\\n align-items: center;\\n justify-content: space-between;\\n }\\n [data-nextjs-dialog-left-right] > nav {\\n flex: 1;\\n display: flex;\\n align-items: center;\\n margin-right: var(--size-gap);\\n }\\n [data-nextjs-dialog-left-right] > nav > button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n\\n width: calc(var(--size-gap-double) + var(--size-gap));\\n height: calc(var(--size-gap-double) + var(--size-gap));\\n font-size: 0;\\n border: none;\\n background-color: rgba(255, 85, 85, 0.1);\\n color: var(--color-ansi-red);\\n cursor: pointer;\\n transition: background-color 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > nav > button > svg {\\n width: auto;\\n height: calc(var(--size-gap) + var(--size-gap-half));\\n }\\n [data-nextjs-dialog-left-right] > nav > button:hover {\\n background-color: rgba(255, 85, 85, 0.2);\\n }\\n [data-nextjs-dialog-left-right] > nav > button:disabled {\\n background-color: rgba(255, 85, 85, 0.1);\\n color: rgba(255, 85, 85, 0.4);\\n cursor: not-allowed;\\n }\\n\\n [data-nextjs-dialog-left-right] > nav > button:first-of-type {\\n border-radius: var(--size-gap-half) 0 0 var(--size-gap-half);\\n margin-right: 1px;\\n }\\n [data-nextjs-dialog-left-right] > nav > button:last-of-type {\\n border-radius: 0 var(--size-gap-half) var(--size-gap-half) 0;\\n }\\n\\n [data-nextjs-dialog-left-right] > button:last-of-type {\\n border: 0;\\n padding: 0;\\n\\n background-color: transparent;\\n appearance: none;\\n\\n opacity: 0.4;\\n transition: opacity 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > button:last-of-type:hover {\\n opacity: 0.7;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL0xlZnRSaWdodERpYWxvZ0hlYWRlci9zdHlsZXMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDBDQUF5QztJQUNyQ0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLGlDQUFpQ0MsbUJBQU9BLENBQUMscUlBQStDO0FBQzlGLE1BQU1DLGdCQUFnQkQsbUJBQU9BLENBQUMsZ0pBQTZCO0FBQzNELFNBQVNFO0lBQ0wsTUFBTUMsT0FBT0osK0JBQStCSyxDQUFDLENBQUM7UUFDMUM7S0FDSDtJQUNERixrQkFBa0I7UUFDZCxPQUFPQztJQUNYO0lBQ0EsT0FBT0E7QUFDWDtBQUNBLE1BQU1MLFNBQVMsQ0FBQyxHQUFHRyxjQUFjSSxJQUFJLEVBQUVIO0FBRXZDLElBQUksQ0FBQyxPQUFPUixRQUFRWSxPQUFPLEtBQUssY0FBZSxPQUFPWixRQUFRWSxPQUFPLEtBQUssWUFBWVosU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Btb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJzdHlsZXMiLCJfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2UiLCJyZXF1aXJlIiwiX25vb3B0ZW1wbGF0ZSIsIl90ZW1wbGF0ZU9iamVjdCIsImRhdGEiLCJfIiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js": /*!***********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js ***! \***********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// @ts-ignore\n\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Overlay\", ({\n enumerable: true,\n get: function() {\n return Overlay;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _maintaintabfocus = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! ./maintain--tab-focus */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js\"));\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _bodylocker = __webpack_require__(/*! ./body-locker */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js\");\nconst Overlay = function Overlay(param) {\n _s();\n let { className, children, fixed } = param;\n _react.useEffect(()=>{\n (0, _bodylocker.lock)();\n return ()=>{\n (0, _bodylocker.unlock)();\n };\n }, []);\n const [overlay, setOverlay] = _react.useState(null);\n const onOverlay = _react.useCallback((el)=>{\n setOverlay(el);\n }, []);\n _react.useEffect(()=>{\n if (overlay == null) {\n return;\n }\n const handle2 = (0, _maintaintabfocus.default)({\n context: overlay\n });\n return ()=>{\n handle2.disengage();\n };\n }, [\n overlay\n ]);\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-overlay\": true,\n className: className,\n ref: onOverlay\n }, /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-dialog-backdrop\": true,\n \"data-nextjs-dialog-backdrop-fixed\": fixed ? true : undefined\n }), children);\n};\n_s(Overlay, \"7AKWSbA/gHapd2YTyFggUak94M8=\");\n_c = Overlay;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Overlay.js.map\nvar _c;\n$RefreshReg$(_c, \"Overlay\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL092ZXJsYXkvT3ZlcmxheS5qcyIsIm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//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js": /*!***************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js ***! \***************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n lock: function() {\n return lock;\n },\n unlock: function() {\n return unlock;\n }\n});\nlet previousBodyPaddingRight;\nlet previousBodyOverflowSetting;\nlet activeLocks = 0;\nfunction lock() {\n setTimeout(()=>{\n if (activeLocks++ > 0) {\n return;\n }\n const scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n if (scrollBarGap > 0) {\n previousBodyPaddingRight = document.body.style.paddingRight;\n document.body.style.paddingRight = \"\" + scrollBarGap + \"px\";\n }\n previousBodyOverflowSetting = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n });\n}\nfunction unlock() {\n setTimeout(()=>{\n if (activeLocks === 0 || --activeLocks !== 0) {\n return;\n }\n if (previousBodyPaddingRight !== undefined) {\n document.body.style.paddingRight = previousBodyPaddingRight;\n previousBodyPaddingRight = undefined;\n }\n if (previousBodyOverflowSetting !== undefined) {\n document.body.style.overflow = previousBodyOverflowSetting;\n previousBodyOverflowSetting = undefined;\n }\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=body-locker.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJ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cy5kZWZhdWx0ICE9PSBudWxsKSkgJiYgdHlwZW9mIGV4cG9ydHMuZGVmYXVsdC5fX2VzTW9kdWxlID09PSAndW5kZWZpbmVkJykge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJvZHktbG9ja2VyLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsImxvY2siLCJ1bmxvY2siLCJfZXhwb3J0IiwidGFyZ2V0IiwiYWxsIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJwcmV2aW91c0JvZHlQYWRkaW5nUmlnaHQiLCJwcmV2aW91c0JvZHlPdmVyZmxvd1NldHRpbmciLCJhY3RpdmVMb2NrcyIsInNldFRpbWVvdXQiLCJzY3JvbGxCYXJHYXAiLCJ3aW5kb3ciLCJpbm5lcldpZHRoIiwiZG9jdW1lbnQiLCJkb2N1bWVudEVsZW1lbnQiLCJjbGllbnRXaWR0aCIsImJvZHkiLCJzdHlsZSIsInBhZGRpbmdSaWdodCIsIm92ZXJmbG93IiwidW5kZWZpbmVkIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js": /*!*********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js ***! \*********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Overlay\", ({\n enumerable: true,\n get: function() {\n return _Overlay.Overlay;\n }\n}));\nconst _Overlay = __webpack_require__(/*! ./Overlay */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL092ZXJsYXkvaW5kZXguanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDJDQUEwQztJQUN0Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0MsU0FBU0MsT0FBTztJQUMzQjtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1ELFdBQVdFLG1CQUFPQSxDQUFDLG1JQUFXO0FBRXBDLElBQUksQ0FBQyxPQUFPTixRQUFRTyxPQUFPLEtBQUssY0FBZSxPQUFPUCxRQUFRTyxPQUFPLEtBQUssWUFBWVAsUUFBUU8sT0FBTyxLQUFLLElBQUksS0FBTSxPQUFPUCxRQUFRTyxPQUFPLENBQUNDLFVBQVUsS0FBSyxhQUFhO0lBQ3JLVixPQUFPQyxjQUFjLENBQUNDLFFBQVFPLE9BQ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Xhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJfT3ZlcmxheSIsIk92ZXJsYXkiLCJyZXF1aXJlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js": /*!***********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js ***! \***********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* eslint-disable */ // @ts-nocheck\n// Copied from https://github.com/medialize/ally.js\n// License: MIT\n// Copyright (c) 2015 Rodney Rehm\n//\n// Entrypoint: ally.js/maintain/tab-focus\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return _default;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _platform = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/platform */ \"(app-client)/./node_modules/next/dist/compiled/platform/platform.js\"));\nconst _cssescape = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/css.escape */ \"(app-client)/./node_modules/next/dist/compiled/css.escape/css.escape.js\"));\n// input may be undefined, selector-tring, Node, NodeList, HTMLCollection, array of Nodes\n// yes, to some extent this is a bad replica of jQuery's constructor function\nfunction nodeArray(input) {\n if (!input) {\n return [];\n }\n if (Array.isArray(input)) {\n return input;\n }\n // instanceof Node - does not work with iframes\n if (input.nodeType !== undefined) {\n return [\n input\n ];\n }\n if (typeof input === \"string\") {\n input = document.querySelectorAll(input);\n }\n if (input.length !== undefined) {\n return [].slice.call(input, 0);\n }\n throw new TypeError(\"unexpected input \" + String(input));\n}\nfunction contextToElement(_ref) {\n var context = _ref.context, _ref$label = _ref.label, label = _ref$label === undefined ? \"context-to-element\" : _ref$label, resolveDocument = _ref.resolveDocument, defaultToDocument = _ref.defaultToDocument;\n var element = nodeArray(context)[0];\n if (resolveDocument && element && element.nodeType === Node.DOCUMENT_NODE) {\n element = element.documentElement;\n }\n if (!element && defaultToDocument) {\n return document.documentElement;\n }\n if (!element) {\n throw new TypeError(label + \" requires valid options.context\");\n }\n if (element.nodeType !== Node.ELEMENT_NODE && element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {\n throw new TypeError(label + \" requires options.context to be an Element\");\n }\n return element;\n}\nfunction getShadowHost() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context;\n var element = contextToElement({\n label: \"get/shadow-host\",\n context: context\n });\n // walk up to the root\n var container = null;\n while(element){\n container = element;\n element = element.parentNode;\n }\n // https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType\n // NOTE: Firefox 34 does not expose ShadowRoot.host (but 37 does)\n if (container.nodeType === container.DOCUMENT_FRAGMENT_NODE && container.host) {\n // the root is attached to a fragment node that has a host\n return container.host;\n }\n return null;\n}\nfunction getDocument(node) {\n if (!node) {\n return document;\n }\n if (node.nodeType === Node.DOCUMENT_NODE) {\n return node;\n }\n return node.ownerDocument || document;\n}\nfunction isActiveElement(context) {\n var element = contextToElement({\n label: \"is/active-element\",\n resolveDocument: true,\n context: context\n });\n var _document = getDocument(element);\n if (_document.activeElement === element) {\n return true;\n }\n var shadowHost = getShadowHost({\n context: element\n });\n if (shadowHost && shadowHost.shadowRoot.activeElement === element) {\n return true;\n }\n return false;\n}\n// [elem, elem.parent, elem.parent.parent, …, html]\n// will not contain the shadowRoot (DOCUMENT_FRAGMENT_NODE) and shadowHost\nfunction getParents() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context;\n var list = [];\n var element = contextToElement({\n label: \"get/parents\",\n context: context\n });\n while(element){\n list.push(element);\n // IE does know support parentElement on SVGElement\n element = element.parentNode;\n if (element && element.nodeType !== Node.ELEMENT_NODE) {\n element = null;\n }\n }\n return list;\n}\n// Element.prototype.matches may be available at a different name\n// https://developer.mozilla.org/en/docs/Web/API/Element/matches\nvar names = [\n \"matches\",\n \"webkitMatchesSelector\",\n \"mozMatchesSelector\",\n \"msMatchesSelector\"\n];\nvar name = null;\nfunction findMethodName(element) {\n names.some(function(_name) {\n if (!element[_name]) {\n return false;\n }\n name = _name;\n return true;\n });\n}\nfunction elementMatches(element, selector) {\n if (!name) {\n findMethodName(element);\n }\n return element[name](selector);\n}\n// deep clone of original platform\nvar platform = JSON.parse(JSON.stringify(_platform.default));\n// operating system\nvar os = platform.os.family || \"\";\nvar ANDROID = os === \"Android\";\nvar WINDOWS = os.slice(0, 7) === \"Windows\";\nvar OSX = os === \"OS X\";\nvar IOS = os === \"iOS\";\n// layout\nvar BLINK = platform.layout === \"Blink\";\nvar GECKO = platform.layout === \"Gecko\";\nvar TRIDENT = platform.layout === \"Trident\";\nvar EDGE = platform.layout === \"EdgeHTML\";\nvar WEBKIT = platform.layout === \"WebKit\";\n// browser version (not layout engine version!)\nvar version = parseFloat(platform.version);\nvar majorVersion = Math.floor(version);\nplatform.majorVersion = majorVersion;\nplatform.is = {\n // operating system\n ANDROID: ANDROID,\n WINDOWS: WINDOWS,\n OSX: OSX,\n IOS: IOS,\n // layout\n BLINK: BLINK,\n GECKO: GECKO,\n TRIDENT: TRIDENT,\n EDGE: EDGE,\n WEBKIT: WEBKIT,\n // INTERNET EXPLORERS\n IE9: TRIDENT && majorVersion === 9,\n IE10: TRIDENT && majorVersion === 10,\n IE11: TRIDENT && majorVersion === 11\n};\nfunction before() {\n var data = {\n // remember what had focus to restore after test\n activeElement: document.activeElement,\n // remember scroll positions to restore after test\n windowScrollTop: window.scrollTop,\n windowScrollLeft: window.scrollLeft,\n bodyScrollTop: document.body.scrollTop,\n bodyScrollLeft: document.body.scrollLeft\n };\n // wrap tests in an element hidden from screen readers to prevent them\n // from announcing focus, which can be quite irritating to the user\n var iframe = document.createElement(\"iframe\");\n iframe.setAttribute(\"style\", \"position:absolute; position:fixed; top:0; left:-2px; width:1px; height:1px; overflow:hidden;\");\n iframe.setAttribute(\"aria-live\", \"off\");\n iframe.setAttribute(\"aria-busy\", \"true\");\n iframe.setAttribute(\"aria-hidden\", \"true\");\n document.body.appendChild(iframe);\n var _window = iframe.contentWindow;\n var _document = _window.document;\n _document.open();\n _document.close();\n var wrapper = _document.createElement(\"div\");\n _document.body.appendChild(wrapper);\n data.iframe = iframe;\n data.wrapper = wrapper;\n data.window = _window;\n data.document = _document;\n return data;\n}\n// options.element:\n// {string} element name\n// {function} callback(wrapper, document) to generate an element\n// options.mutate: (optional)\n// {function} callback(element, wrapper, document) to manipulate element prior to focus-test.\n// Can return DOMElement to define focus target (default: element)\n// options.validate: (optional)\n// {function} callback(element, focusTarget, document) to manipulate test-result\nfunction test(data, options) {\n // make sure we operate on a clean slate\n data.wrapper.innerHTML = \"\";\n // create dummy element to test focusability of\n var element = typeof options.element === \"string\" ? data.document.createElement(options.element) : options.element(data.wrapper, data.document);\n // allow callback to further specify dummy element\n // and optionally define element to focus\n var focus = options.mutate && options.mutate(element, data.wrapper, data.document);\n if (!focus && focus !== false) {\n focus = element;\n }\n // element needs to be part of the DOM to be focusable\n !element.parentNode && data.wrapper.appendChild(element);\n // test if the element with invalid tabindex can be focused\n focus && focus.focus && focus.focus();\n // validate test's result\n return options.validate ? options.validate(element, focus, data.document) : data.document.activeElement === focus;\n}\nfunction after(data) {\n // restore focus to what it was before test and cleanup\n if (data.activeElement === document.body) {\n document.activeElement && document.activeElement.blur && document.activeElement.blur();\n if (platform.is.IE10) {\n // IE10 does not redirect focus to <body> when the activeElement is removed\n document.body.focus();\n }\n } else {\n data.activeElement && data.activeElement.focus && data.activeElement.focus();\n }\n document.body.removeChild(data.iframe);\n // restore scroll position\n window.scrollTop = data.windowScrollTop;\n window.scrollLeft = data.windowScrollLeft;\n document.body.scrollTop = data.bodyScrollTop;\n document.body.scrollLeft = data.bodyScrollLeft;\n}\nfunction detectFocus(tests) {\n var data = before();\n var results = {};\n Object.keys(tests).map(function(key) {\n results[key] = test(data, tests[key]);\n });\n after(data);\n return results;\n}\n// this file is overwritten by `npm run build:pre`\nvar version$1 = \"1.4.1\";\n/*\n Facility to cache test results in localStorage.\n\n USAGE:\n cache.get('key');\n cache.set('key', 'value');\n */ function readLocalStorage(key) {\n // allow reading from storage to retrieve previous support results\n // even while the document does not have focus\n var data = void 0;\n try {\n data = window.localStorage && window.localStorage.getItem(key);\n data = data ? JSON.parse(data) : {};\n } catch (e) {\n data = {};\n }\n return data;\n}\nfunction writeLocalStorage(key, value) {\n if (!document.hasFocus()) {\n // if the document does not have focus when tests are executed, focus() may\n // not be handled properly and events may not be dispatched immediately.\n // This can happen when a document is reloaded while Developer Tools have focus.\n try {\n window.localStorage && window.localStorage.removeItem(key);\n } catch (e) {\n // ignore\n }\n return;\n }\n try {\n window.localStorage && window.localStorage.setItem(key, JSON.stringify(value));\n } catch (e) {\n // ignore\n }\n}\nvar userAgent = true && window.navigator.userAgent || \"\";\nvar cacheKey = \"ally-supports-cache\";\nvar cache = readLocalStorage(cacheKey);\n// update the cache if ally or the user agent changed (newer version, etc)\nif (cache.userAgent !== userAgent || cache.version !== version$1) {\n cache = {};\n}\ncache.userAgent = userAgent;\ncache.version = version$1;\nvar cache$1 = {\n get: function get() {\n return cache;\n },\n set: function set(values) {\n Object.keys(values).forEach(function(key) {\n cache[key] = values[key];\n });\n cache.time = new Date().toISOString();\n writeLocalStorage(cacheKey, cache);\n }\n};\nfunction cssShadowPiercingDeepCombinator() {\n var combinator = void 0;\n // see https://dev.w3.org/csswg/css-scoping-1/#deep-combinator\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1117572\n // https://code.google.com/p/chromium/issues/detail?id=446051\n try {\n document.querySelector(\"html >>> :first-child\");\n combinator = \">>>\";\n } catch (noArrowArrowArrow) {\n try {\n // old syntax supported at least up to Chrome 41\n // https://code.google.com/p/chromium/issues/detail?id=446051\n document.querySelector(\"html /deep/ :first-child\");\n combinator = \"/deep/\";\n } catch (noDeep) {\n combinator = \"\";\n }\n }\n return combinator;\n}\nvar gif = \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\";\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\nvar focusAreaImgTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"image-map-tabindex-test\">' + '<area shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#image-map-tabindex-test\" tabindex=\"-1\" alt=\"\" src=\"' + gif + '\">';\n return element.querySelector(\"area\");\n }\n};\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\nvar focusAreaTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"image-map-tabindex-test\">' + '<area href=\"#void\" tabindex=\"-1\" shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#image-map-tabindex-test\" alt=\"\" src=\"' + gif + '\">';\n return false;\n },\n validate: function validate(element, focusTarget, _document) {\n if (platform.is.GECKO) {\n // fixes https://github.com/medialize/ally.js/issues/35\n // Firefox loads the DataURI asynchronously, causing a false-negative\n return true;\n }\n var focus = element.querySelector(\"area\");\n focus.focus();\n return _document.activeElement === focus;\n }\n};\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\nvar focusAreaWithoutHref = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"image-map-area-href-test\">' + '<area shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#image-map-area-href-test\" alt=\"\" src=\"' + gif + '\">';\n return element.querySelector(\"area\");\n },\n validate: function validate(element, focusTarget, _document) {\n if (platform.is.GECKO) {\n // fixes https://github.com/medialize/ally.js/issues/35\n // Firefox loads the DataURI asynchronously, causing a false-negative\n return true;\n }\n return _document.activeElement === focusTarget;\n }\n};\nvar focusAudioWithoutControls = {\n name: \"can-focus-audio-without-controls\",\n element: \"audio\",\n mutate: function mutate(element) {\n try {\n // invalid media file can trigger warning in console, data-uri to prevent HTTP request\n element.setAttribute(\"src\", gif);\n } catch (e) {\n // IE9 may throw \"Error: Not implemented\"\n }\n }\n};\nvar invalidGif = \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\";\n// NOTE: https://github.com/medialize/ally.js/issues/35\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\nvar focusBrokenImageMap = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"broken-image-map-test\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#broken-image-map-test\" alt=\"\" src=\"' + invalidGif + '\">';\n return element.querySelector(\"area\");\n }\n};\n// Children of focusable elements with display:flex are focusable in IE10-11\nvar focusChildrenOfFocusableFlexbox = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", \"-1\");\n element.setAttribute(\"style\", \"display: -webkit-flex; display: -ms-flexbox; display: flex;\");\n element.innerHTML = '<span style=\"display: block;\">hello</span>';\n return element.querySelector(\"span\");\n }\n};\n// fieldset[tabindex=0][disabled] should not be focusable, but Blink and WebKit disagree\n// @specification https://www.w3.org/TR/html5/disabled-elements.html#concept-element-disabled\n// @browser-issue Chromium https://crbug.com/453847\n// @browser-issue WebKit https://bugs.webkit.org/show_bug.cgi?id=141086\nvar focusFieldsetDisabled = {\n element: \"fieldset\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", 0);\n element.setAttribute(\"disabled\", \"disabled\");\n }\n};\nvar focusFieldset = {\n element: \"fieldset\",\n mutate: function mutate(element) {\n element.innerHTML = \"<legend>legend</legend><p>content</p>\";\n }\n};\n// elements with display:flex are focusable in IE10-11\nvar focusFlexboxContainer = {\n element: \"span\",\n mutate: function mutate(element) {\n element.setAttribute(\"style\", \"display: -webkit-flex; display: -ms-flexbox; display: flex;\");\n element.innerHTML = '<span style=\"display: block;\">hello</span>';\n }\n};\n// form[tabindex=0][disabled] should be focusable as the\n// specification doesn't know the disabled attribute on the form element\n// @specification https://www.w3.org/TR/html5/forms.html#the-form-element\nvar focusFormDisabled = {\n element: \"form\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", 0);\n element.setAttribute(\"disabled\", \"disabled\");\n }\n};\n// NOTE: https://github.com/medialize/ally.js/issues/35\n// fixes https://github.com/medialize/ally.js/issues/20\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-ismap\nvar focusImgIsmap = {\n element: \"a\",\n mutate: function mutate(element) {\n element.href = \"#void\";\n element.innerHTML = '<img ismap src=\"' + gif + '\" alt=\"\">';\n return element.querySelector(\"img\");\n }\n};\n// NOTE: https://github.com/medialize/ally.js/issues/35\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\nvar focusImgUsemapTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"image-map-tabindex-test\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#image-map-tabindex-test\" tabindex=\"-1\" alt=\"\" ' + 'src=\"' + gif + '\">';\n return element.querySelector(\"img\");\n }\n};\nvar focusInHiddenIframe = {\n element: function element(wrapper, _document) {\n var iframe = _document.createElement(\"iframe\");\n // iframe must be part of the DOM before accessing the contentWindow is possible\n wrapper.appendChild(iframe);\n // create the iframe's default document (<html><head></head><body></body></html>)\n var iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.close();\n return iframe;\n },\n mutate: function mutate(iframe) {\n iframe.style.visibility = \"hidden\";\n var iframeDocument = iframe.contentWindow.document;\n var input = iframeDocument.createElement(\"input\");\n iframeDocument.body.appendChild(input);\n return input;\n },\n validate: function validate(iframe) {\n var iframeDocument = iframe.contentWindow.document;\n var focus = iframeDocument.querySelector(\"input\");\n return iframeDocument.activeElement === focus;\n }\n};\nvar result = !platform.is.WEBKIT;\nfunction focusInZeroDimensionObject() {\n return result;\n}\n// Firefox allows *any* value and treats invalid values like tabindex=\"-1\"\n// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\nvar focusInvalidTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", \"invalid-value\");\n }\n};\nvar focusLabelTabindex = {\n element: \"label\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", \"-1\");\n },\n validate: function validate(element, focusTarget, _document) {\n // force layout in Chrome 49, otherwise the element won't be focusable\n /* eslint-disable no-unused-vars */ var variableToPreventDeadCodeElimination = element.offsetHeight;\n /* eslint-enable no-unused-vars */ element.focus();\n return _document.activeElement === element;\n }\n};\nvar svg = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtb\" + \"G5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0ic3ZnIj48dGV4dCB4PSIxMCIgeT0iMjAiIGlkPSJ\" + \"zdmctbGluay10ZXh0Ij50ZXh0PC90ZXh0Pjwvc3ZnPg==\";\n// Note: IE10 on BrowserStack does not like this test\nvar focusObjectSvgHidden = {\n element: \"object\",\n mutate: function mutate(element) {\n element.setAttribute(\"type\", \"image/svg+xml\");\n element.setAttribute(\"data\", svg);\n element.setAttribute(\"width\", \"200\");\n element.setAttribute(\"height\", \"50\");\n element.style.visibility = \"hidden\";\n }\n};\n// Note: IE10 on BrowserStack does not like this test\nvar focusObjectSvg = {\n name: \"can-focus-object-svg\",\n element: \"object\",\n mutate: function mutate(element) {\n element.setAttribute(\"type\", \"image/svg+xml\");\n element.setAttribute(\"data\", svg);\n element.setAttribute(\"width\", \"200\");\n element.setAttribute(\"height\", \"50\");\n },\n validate: function validate(element, focusTarget, _document) {\n if (platform.is.GECKO) {\n // Firefox seems to be handling the object creation asynchronously and thereby produces a false negative test result.\n // Because we know Firefox is able to focus object elements referencing SVGs, we simply cheat by sniffing the user agent string\n return true;\n }\n return _document.activeElement === element;\n }\n};\n// Every Environment except IE9 considers SWF objects focusable\nvar result$1 = !platform.is.IE9;\nfunction focusObjectSwf() {\n return result$1;\n}\nvar focusRedirectImgUsemap = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = '<map name=\"focus-redirect-img-usemap\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>' + '<img usemap=\"#focus-redirect-img-usemap\" alt=\"\" ' + 'src=\"' + gif + '\">';\n // focus the <img>, not the <div>\n return element.querySelector(\"img\");\n },\n validate: function validate(element, focusTarget, _document) {\n var target = element.querySelector(\"area\");\n return _document.activeElement === target;\n }\n};\n// see https://jsbin.com/nenirisage/edit?html,js,console,output\nvar focusRedirectLegend = {\n element: \"fieldset\",\n mutate: function mutate(element) {\n element.innerHTML = '<legend>legend</legend><input tabindex=\"-1\"><input tabindex=\"0\">';\n // take care of focus in validate();\n return false;\n },\n validate: function validate(element, focusTarget, _document) {\n var focusable = element.querySelector('input[tabindex=\"-1\"]');\n var tabbable = element.querySelector('input[tabindex=\"0\"]');\n // Firefox requires this test to focus the <fieldset> first, while this is not necessary in\n // https://jsbin.com/nenirisage/edit?html,js,console,output\n element.focus();\n element.querySelector(\"legend\").focus();\n return _document.activeElement === focusable && \"focusable\" || _document.activeElement === tabbable && \"tabbable\" || \"\";\n }\n};\n// https://github.com/medialize/ally.js/issues/21\nvar focusScrollBody = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"style\", \"width: 100px; height: 50px; overflow: auto;\");\n element.innerHTML = '<div style=\"width: 500px; height: 40px;\">scrollable content</div>';\n return element.querySelector(\"div\");\n }\n};\n// https://github.com/medialize/ally.js/issues/21\nvar focusScrollContainerWithoutOverflow = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"style\", \"width: 100px; height: 50px;\");\n element.innerHTML = '<div style=\"width: 500px; height: 40px;\">scrollable content</div>';\n }\n};\n// https://github.com/medialize/ally.js/issues/21\nvar focusScrollContainer = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"style\", \"width: 100px; height: 50px; overflow: auto;\");\n element.innerHTML = '<div style=\"width: 500px; height: 40px;\">scrollable content</div>';\n }\n};\nvar focusSummary = {\n element: \"details\",\n mutate: function mutate(element) {\n element.innerHTML = \"<summary>foo</summary><p>content</p>\";\n return element.firstElementChild;\n }\n};\nfunction makeFocusableForeignObject() {\n // Constructs <foreignObject width=\"30\" height=\"30\"><input type=\"text\"/></foreignObject>\n // without raising a Trusted Types violation\n var foreignObject = document.createElementNS(\"http://www.w3.org/2000/svg\", \"foreignObject\");\n foreignObject.width.baseVal.value = 30;\n foreignObject.height.baseVal.value = 30;\n foreignObject.appendChild(document.createElement(\"input\"));\n foreignObject.lastChild.type = \"text\";\n return foreignObject;\n}\nfunction focusSvgForeignObjectHack(element) {\n // Edge13, Edge14: foreignObject focus hack\n // https://jsbin.com/kunehinugi/edit?html,js,output\n // https://jsbin.com/fajagi/3/edit?html,js,output\n var isSvgElement = element.ownerSVGElement || element.nodeName.toLowerCase() === \"svg\";\n if (!isSvgElement) {\n return false;\n }\n // inject and focus an <input> element into the SVG element to receive focus\n var foreignObject = makeFocusableForeignObject();\n element.appendChild(foreignObject);\n var input = foreignObject.querySelector(\"input\");\n input.focus();\n // upon disabling the activeElement, IE and Edge\n // will not shift focus to <body> like all the other\n // browsers, but instead find the first focusable\n // ancestor and shift focus to that\n input.disabled = true;\n // clean up\n element.removeChild(foreignObject);\n return true;\n}\nfunction generate(element) {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">' + element + \"</svg>\";\n}\nfunction focus(element) {\n if (element.focus) {\n return;\n }\n try {\n HTMLElement.prototype.focus.call(element);\n } catch (e) {\n focusSvgForeignObjectHack(element);\n }\n}\nfunction validate(element, focusTarget, _document) {\n focus(focusTarget);\n return _document.activeElement === focusTarget;\n}\nvar focusSvgFocusableAttribute = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate('<text focusable=\"true\">a</text>');\n return element.querySelector(\"text\");\n },\n validate: validate\n};\nvar focusSvgTabindexAttribute = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate('<text tabindex=\"0\">a</text>');\n return element.querySelector(\"text\");\n },\n validate: validate\n};\nvar focusSvgNegativeTabindexAttribute = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate('<text tabindex=\"-1\">a</text>');\n return element.querySelector(\"text\");\n },\n validate: validate\n};\nvar focusSvgUseTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate([\n '<g id=\"ally-test-target\"><a xlink:href=\"#void\"><text>link</text></a></g>',\n '<use xlink:href=\"#ally-test-target\" x=\"0\" y=\"0\" tabindex=\"-1\" />'\n ].join(\"\"));\n return element.querySelector(\"use\");\n },\n validate: validate\n};\nvar focusSvgForeignobjectTabindex = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate('<foreignObject tabindex=\"-1\"><input type=\"text\" /></foreignObject>');\n // Safari 8's quersSelector() can't identify foreignObject, but getElementyByTagName() can\n return element.querySelector(\"foreignObject\") || element.getElementsByTagName(\"foreignObject\")[0];\n },\n validate: validate\n};\n// Firefox seems to be handling the SVG-document-in-iframe creation asynchronously\n// and thereby produces a false negative test result. Thus the test is pointless\n// and we resort to UA sniffing once again.\n// see http://jsbin.com/vunadohoko/1/edit?js,console,output\nvar result$2 = Boolean(platform.is.GECKO && typeof SVGElement !== \"undefined\" && SVGElement.prototype.focus);\nfunction focusSvgInIframe() {\n return result$2;\n}\nvar focusSvg = {\n element: \"div\",\n mutate: function mutate(element) {\n element.innerHTML = generate(\"\");\n return element.firstChild;\n },\n validate: validate\n};\n// Firefox allows *any* value and treats invalid values like tabindex=\"-1\"\n// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\nvar focusTabindexTrailingCharacters = {\n element: \"div\",\n mutate: function mutate(element) {\n element.setAttribute(\"tabindex\", \"3x\");\n }\n};\nvar focusTable = {\n element: \"table\",\n mutate: function mutate(element, wrapper, _document) {\n // IE9 has a problem replacing TBODY contents with innerHTML.\n // https://stackoverflow.com/a/8097055/515124\n // element.innerHTML = '<tr><td>cell</td></tr>';\n var fragment = _document.createDocumentFragment();\n fragment.innerHTML = \"<tr><td>cell</td></tr>\";\n element.appendChild(fragment);\n }\n};\nvar focusVideoWithoutControls = {\n element: \"video\",\n mutate: function mutate(element) {\n try {\n // invalid media file can trigger warning in console, data-uri to prevent HTTP request\n element.setAttribute(\"src\", gif);\n } catch (e) {\n // IE9 may throw \"Error: Not implemented\"\n }\n }\n};\n// https://jsbin.com/vafaba/3/edit?html,js,console,output\nvar result$3 = platform.is.GECKO || platform.is.TRIDENT || platform.is.EDGE;\nfunction tabsequenceAreaAtImgPosition() {\n return result$3;\n}\nvar testCallbacks = {\n cssShadowPiercingDeepCombinator: cssShadowPiercingDeepCombinator,\n focusInZeroDimensionObject: focusInZeroDimensionObject,\n focusObjectSwf: focusObjectSwf,\n focusSvgInIframe: focusSvgInIframe,\n tabsequenceAreaAtImgPosition: tabsequenceAreaAtImgPosition\n};\nvar testDescriptions = {\n focusAreaImgTabindex: focusAreaImgTabindex,\n focusAreaTabindex: focusAreaTabindex,\n focusAreaWithoutHref: focusAreaWithoutHref,\n focusAudioWithoutControls: focusAudioWithoutControls,\n focusBrokenImageMap: focusBrokenImageMap,\n focusChildrenOfFocusableFlexbox: focusChildrenOfFocusableFlexbox,\n focusFieldsetDisabled: focusFieldsetDisabled,\n focusFieldset: focusFieldset,\n focusFlexboxContainer: focusFlexboxContainer,\n focusFormDisabled: focusFormDisabled,\n focusImgIsmap: focusImgIsmap,\n focusImgUsemapTabindex: focusImgUsemapTabindex,\n focusInHiddenIframe: focusInHiddenIframe,\n focusInvalidTabindex: focusInvalidTabindex,\n focusLabelTabindex: focusLabelTabindex,\n focusObjectSvg: focusObjectSvg,\n focusObjectSvgHidden: focusObjectSvgHidden,\n focusRedirectImgUsemap: focusRedirectImgUsemap,\n focusRedirectLegend: focusRedirectLegend,\n focusScrollBody: focusScrollBody,\n focusScrollContainerWithoutOverflow: focusScrollContainerWithoutOverflow,\n focusScrollContainer: focusScrollContainer,\n focusSummary: focusSummary,\n focusSvgFocusableAttribute: focusSvgFocusableAttribute,\n focusSvgTabindexAttribute: focusSvgTabindexAttribute,\n focusSvgNegativeTabindexAttribute: focusSvgNegativeTabindexAttribute,\n focusSvgUseTabindex: focusSvgUseTabindex,\n focusSvgForeignobjectTabindex: focusSvgForeignobjectTabindex,\n focusSvg: focusSvg,\n focusTabindexTrailingCharacters: focusTabindexTrailingCharacters,\n focusTable: focusTable,\n focusVideoWithoutControls: focusVideoWithoutControls\n};\nfunction executeTests() {\n var results = detectFocus(testDescriptions);\n Object.keys(testCallbacks).forEach(function(key) {\n results[key] = testCallbacks[key]();\n });\n return results;\n}\nvar supportsCache = null;\nfunction _supports() {\n if (supportsCache) {\n return supportsCache;\n }\n supportsCache = cache$1.get();\n if (!supportsCache.time) {\n cache$1.set(executeTests());\n supportsCache = cache$1.get();\n }\n return supportsCache;\n}\nvar supports = void 0;\n// https://www.w3.org/TR/html5/infrastructure.html#rules-for-parsing-integers\n// NOTE: all browsers agree to allow trailing spaces as well\nvar validIntegerPatternNoTrailing = /^\\s*(-|\\+)?[0-9]+\\s*$/;\nvar validIntegerPatternWithTrailing = /^\\s*(-|\\+)?[0-9]+.*$/;\nfunction isValidTabindex(context) {\n if (!supports) {\n supports = _supports();\n }\n var validIntegerPattern = supports.focusTabindexTrailingCharacters ? validIntegerPatternWithTrailing : validIntegerPatternNoTrailing;\n var element = contextToElement({\n label: \"is/valid-tabindex\",\n resolveDocument: true,\n context: context\n });\n // Edge 14 has a capitalization problem on SVG elements,\n // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9282058/\n var hasTabindex = element.hasAttribute(\"tabindex\");\n var hasTabIndex = element.hasAttribute(\"tabIndex\");\n if (!hasTabindex && !hasTabIndex) {\n return false;\n }\n // older Firefox and Internet Explorer don't support tabindex on SVG elements\n var isSvgElement = element.ownerSVGElement || element.nodeName.toLowerCase() === \"svg\";\n if (isSvgElement && !supports.focusSvgTabindexAttribute) {\n return false;\n }\n // @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n if (supports.focusInvalidTabindex) {\n return true;\n }\n // an element matches the tabindex selector even if its value is invalid\n var tabindex = element.getAttribute(hasTabindex ? \"tabindex\" : \"tabIndex\");\n // IE11 parses tabindex=\"\" as the value \"-32768\"\n // @browser-issue Trident https://connect.microsoft.com/IE/feedback/details/1072965\n if (tabindex === \"-32768\") {\n return false;\n }\n return Boolean(tabindex && validIntegerPattern.test(tabindex));\n}\nfunction tabindexValue(element) {\n if (!isValidTabindex(element)) {\n return null;\n }\n // Edge 14 has a capitalization problem on SVG elements,\n // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9282058/\n var hasTabindex = element.hasAttribute(\"tabindex\");\n var attributeName = hasTabindex ? \"tabindex\" : \"tabIndex\";\n // @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n var tabindex = parseInt(element.getAttribute(attributeName), 10);\n return isNaN(tabindex) ? -1 : tabindex;\n}\n// this is a shared utility file for focus-relevant.js and tabbable.js\n// separate testing of this file's functions is not necessary,\n// as they're implicitly tested by way of the consumers\nfunction isUserModifyWritable(style) {\n // https://www.w3.org/TR/1999/WD-css3-userint-19990916#user-modify\n // https://github.com/medialize/ally.js/issues/17\n var userModify = style.webkitUserModify || \"\";\n return Boolean(userModify && userModify.indexOf(\"write\") !== -1);\n}\nfunction hasCssOverflowScroll(style) {\n return [\n style.getPropertyValue(\"overflow\"),\n style.getPropertyValue(\"overflow-x\"),\n style.getPropertyValue(\"overflow-y\")\n ].some(function(overflow) {\n return overflow === \"auto\" || overflow === \"scroll\";\n });\n}\nfunction hasCssDisplayFlex(style) {\n return style.display.indexOf(\"flex\") > -1;\n}\nfunction isScrollableContainer(element, nodeName, parentNodeName, parentStyle) {\n if (nodeName !== \"div\" && nodeName !== \"span\") {\n // Internet Explorer advances scrollable containers and bodies to focusable\n // only if the scrollable container is <div> or <span> - this does *not*\n // happen for <section>, <article>, …\n return false;\n }\n if (parentNodeName && parentNodeName !== \"div\" && parentNodeName !== \"span\" && !hasCssOverflowScroll(parentStyle)) {\n return false;\n }\n return element.offsetHeight < element.scrollHeight || element.offsetWidth < element.scrollWidth;\n}\nvar supports$1 = void 0;\nfunction isFocusRelevantRules() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, _ref$except = _ref.except, except = _ref$except === undefined ? {\n flexbox: false,\n scrollable: false,\n shadow: false\n } : _ref$except;\n if (!supports$1) {\n supports$1 = _supports();\n }\n var element = contextToElement({\n label: \"is/focus-relevant\",\n resolveDocument: true,\n context: context\n });\n if (!except.shadow && element.shadowRoot) {\n // a ShadowDOM host receives focus when the focus moves to its content\n return true;\n }\n var nodeName = element.nodeName.toLowerCase();\n if (nodeName === \"input\" && element.type === \"hidden\") {\n // input[type=\"hidden\"] supports.cannot be focused\n return false;\n }\n if (nodeName === \"input\" || nodeName === \"select\" || nodeName === \"button\" || nodeName === \"textarea\") {\n return true;\n }\n if (nodeName === \"legend\" && supports$1.focusRedirectLegend) {\n // specifics filtered in is/focusable\n return true;\n }\n if (nodeName === \"label\") {\n // specifics filtered in is/focusable\n return true;\n }\n if (nodeName === \"area\") {\n // specifics filtered in is/focusable\n return true;\n }\n if (nodeName === \"a\" && element.hasAttribute(\"href\")) {\n return true;\n }\n if (nodeName === \"object\" && element.hasAttribute(\"usemap\")) {\n // object[usemap] is not focusable in any browser\n return false;\n }\n if (nodeName === \"object\") {\n var svgType = element.getAttribute(\"type\");\n if (!supports$1.focusObjectSvg && svgType === \"image/svg+xml\") {\n // object[type=\"image/svg+xml\"] is not focusable in Internet Explorer\n return false;\n } else if (!supports$1.focusObjectSwf && svgType === \"application/x-shockwave-flash\") {\n // object[type=\"application/x-shockwave-flash\"] is not focusable in Internet Explorer 9\n return false;\n }\n }\n if (nodeName === \"iframe\" || nodeName === \"object\") {\n // browsing context containers\n return true;\n }\n if (nodeName === \"embed\" || nodeName === \"keygen\") {\n // embed is considered focus-relevant but not focusable\n // see https://github.com/medialize/ally.js/issues/82\n return true;\n }\n if (element.hasAttribute(\"contenteditable\")) {\n // also see CSS property user-modify below\n return true;\n }\n if (nodeName === \"audio\" && (supports$1.focusAudioWithoutControls || element.hasAttribute(\"controls\"))) {\n return true;\n }\n if (nodeName === \"video\" && (supports$1.focusVideoWithoutControls || element.hasAttribute(\"controls\"))) {\n return true;\n }\n if (supports$1.focusSummary && nodeName === \"summary\") {\n return true;\n }\n var validTabindex = isValidTabindex(element);\n if (nodeName === \"img\" && element.hasAttribute(\"usemap\")) {\n // Gecko, Trident and Edge do not allow an image with an image map and tabindex to be focused,\n // it appears the tabindex is overruled so focus is still forwarded to the <map>\n return validTabindex && supports$1.focusImgUsemapTabindex || supports$1.focusRedirectImgUsemap;\n }\n if (supports$1.focusTable && (nodeName === \"table\" || nodeName === \"td\")) {\n // IE10-11 supports.can focus <table> and <td>\n return true;\n }\n if (supports$1.focusFieldset && nodeName === \"fieldset\") {\n // IE10-11 supports.can focus <fieldset>\n return true;\n }\n var isSvgElement = nodeName === \"svg\";\n var isSvgContent = element.ownerSVGElement;\n var focusableAttribute = element.getAttribute(\"focusable\");\n var tabindex = tabindexValue(element);\n if (nodeName === \"use\" && tabindex !== null && !supports$1.focusSvgUseTabindex) {\n // <use> cannot be made focusable by adding a tabindex attribute anywhere but Blink and WebKit\n return false;\n }\n if (nodeName === \"foreignobject\") {\n // <use> can only be made focusable in Blink and WebKit\n return tabindex !== null && supports$1.focusSvgForeignobjectTabindex;\n }\n if (elementMatches(element, \"svg a\") && element.hasAttribute(\"xlink:href\")) {\n return true;\n }\n if ((isSvgElement || isSvgContent) && element.focus && !supports$1.focusSvgNegativeTabindexAttribute && tabindex < 0) {\n // Firefox 51 and 52 treat any natively tabbable SVG element with\n // tabindex=\"-1\" as tabbable and everything else as inert\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1302340\n return false;\n }\n if (isSvgElement) {\n return validTabindex || supports$1.focusSvg || supports$1.focusSvgInIframe || // Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2\n Boolean(supports$1.focusSvgFocusableAttribute && focusableAttribute && focusableAttribute === \"true\");\n }\n if (isSvgContent) {\n if (supports$1.focusSvgTabindexAttribute && validTabindex) {\n return true;\n }\n if (supports$1.focusSvgFocusableAttribute) {\n // Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2\n return focusableAttribute === \"true\";\n }\n }\n // https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n if (validTabindex) {\n return true;\n }\n var style = window.getComputedStyle(element, null);\n if (isUserModifyWritable(style)) {\n return true;\n }\n if (supports$1.focusImgIsmap && nodeName === \"img\" && element.hasAttribute(\"ismap\")) {\n // IE10-11 considers the <img> in <a href><img ismap> focusable\n // https://github.com/medialize/ally.js/issues/20\n var hasLinkParent = getParents({\n context: element\n }).some(function(parent) {\n return parent.nodeName.toLowerCase() === \"a\" && parent.hasAttribute(\"href\");\n });\n if (hasLinkParent) {\n return true;\n }\n }\n // https://github.com/medialize/ally.js/issues/21\n if (!except.scrollable && supports$1.focusScrollContainer) {\n if (supports$1.focusScrollContainerWithoutOverflow) {\n // Internet Explorer does will consider the scrollable area focusable\n // if the element is a <div> or a <span> and it is in fact scrollable,\n // regardless of the CSS overflow property\n if (isScrollableContainer(element, nodeName)) {\n return true;\n }\n } else if (hasCssOverflowScroll(style)) {\n // Firefox requires proper overflow setting, IE does not necessarily\n // https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n return true;\n }\n }\n if (!except.flexbox && supports$1.focusFlexboxContainer && hasCssDisplayFlex(style)) {\n // elements with display:flex are focusable in IE10-11\n return true;\n }\n var parent = element.parentElement;\n if (!except.scrollable && parent) {\n var parentNodeName = parent.nodeName.toLowerCase();\n var parentStyle = window.getComputedStyle(parent, null);\n if (supports$1.focusScrollBody && isScrollableContainer(parent, nodeName, parentNodeName, parentStyle)) {\n // scrollable bodies are focusable Internet Explorer\n // https://github.com/medialize/ally.js/issues/21\n return true;\n }\n // Children of focusable elements with display:flex are focusable in IE10-11\n if (supports$1.focusChildrenOfFocusableFlexbox) {\n if (hasCssDisplayFlex(parentStyle)) {\n return true;\n }\n }\n }\n // NOTE: elements marked as inert are not focusable,\n // but that property is not exposed to the DOM\n // https://www.w3.org/TR/html5/editing.html#inert\n return false;\n}\n// bind exceptions to an iterator callback\nisFocusRelevantRules.except = function() {\n var except = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var isFocusRelevant = function isFocusRelevant(context) {\n return isFocusRelevantRules({\n context: context,\n except: except\n });\n };\n isFocusRelevant.rules = isFocusRelevantRules;\n return isFocusRelevant;\n};\n// provide isFocusRelevant(context) as default iterator callback\nvar isFocusRelevant = isFocusRelevantRules.except({});\nfunction findIndex(array, callback) {\n // attempt to use native or polyfilled Array#findIndex first\n if (array.findIndex) {\n return array.findIndex(callback);\n }\n var length = array.length;\n // shortcut if the array is empty\n if (length === 0) {\n return -1;\n }\n // otherwise loop over array\n for(var i = 0; i < length; i++){\n if (callback(array[i], i, array)) {\n return i;\n }\n }\n return -1;\n}\nfunction getContentDocument(node) {\n try {\n // works on <object> and <iframe>\n return node.contentDocument || // works on <object> and <iframe>\n node.contentWindow && node.contentWindow.document || // works on <object> and <iframe> that contain SVG\n node.getSVGDocument && node.getSVGDocument() || null;\n } catch (e) {\n // SecurityError: Failed to read the 'contentDocument' property from 'HTMLObjectElement'\n // also IE may throw member not found exception e.g. on <object type=\"image/png\">\n return null;\n }\n}\nfunction getWindow(node) {\n var _document = getDocument(node);\n return _document.defaultView || window;\n}\nvar shadowPrefix = void 0;\nfunction selectInShadows(selector) {\n if (typeof shadowPrefix !== \"string\") {\n var operator = cssShadowPiercingDeepCombinator();\n if (operator) {\n shadowPrefix = \", html \" + operator + \" \";\n }\n }\n if (!shadowPrefix) {\n return selector;\n }\n return selector + shadowPrefix + selector.replace(/\\s*,\\s*/g, \",\").split(\",\").join(shadowPrefix);\n}\nvar selector = void 0;\nfunction findDocumentHostElement(_window) {\n if (!selector) {\n selector = selectInShadows(\"object, iframe\");\n }\n if (_window._frameElement !== undefined) {\n return _window._frameElement;\n }\n _window._frameElement = null;\n var potentialHosts = _window.parent.document.querySelectorAll(selector);\n [].some.call(potentialHosts, function(element) {\n var _document = getContentDocument(element);\n if (_document !== _window.document) {\n return false;\n }\n _window._frameElement = element;\n return true;\n });\n return _window._frameElement;\n}\nfunction getFrameElement(element) {\n var _window = getWindow(element);\n if (!_window.parent || _window.parent === _window) {\n // if there is no parent browsing context,\n // we're not going to get a frameElement either way\n return null;\n }\n try {\n // see https://developer.mozilla.org/en-US/docs/Web/API/Window/frameElement\n // does not work within <embed> anywhere, and not within in <object> in IE\n return _window.frameElement || findDocumentHostElement(_window);\n } catch (e) {\n return null;\n }\n}\n// https://www.w3.org/TR/html5/rendering.html#being-rendered\n// <area> is not rendered, but we *consider* it visible to simplfiy this function's usage\nvar notRenderedElementsPattern = /^(area)$/;\nfunction computedStyle(element, property) {\n return window.getComputedStyle(element, null).getPropertyValue(property);\n}\nfunction notDisplayed(_path) {\n return _path.some(function(element) {\n // display:none is not visible (optimized away at layout)\n return computedStyle(element, \"display\") === \"none\";\n });\n}\nfunction notVisible(_path) {\n // https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L109-L114\n // NOTE: a nested element can reverse visibility:hidden|collapse by explicitly setting visibility:visible\n // NOTE: visibility can be [\"\", \"visible\", \"hidden\", \"collapse\"]\n var hidden = findIndex(_path, function(element) {\n var visibility = computedStyle(element, \"visibility\");\n return visibility === \"hidden\" || visibility === \"collapse\";\n });\n if (hidden === -1) {\n // there is no hidden element\n return false;\n }\n var visible = findIndex(_path, function(element) {\n return computedStyle(element, \"visibility\") === \"visible\";\n });\n if (visible === -1) {\n // there is no visible element (but a hidden element)\n return true;\n }\n if (hidden < visible) {\n // there is a hidden element and it's closer than the first visible element\n return true;\n }\n // there may be a hidden element, but the closest element is visible\n return false;\n}\nfunction collapsedParent(_path) {\n var offset = 1;\n if (_path[0].nodeName.toLowerCase() === \"summary\") {\n offset = 2;\n }\n return _path.slice(offset).some(function(element) {\n // \"content children\" of a closed details element are not visible\n return element.nodeName.toLowerCase() === \"details\" && element.open === false;\n });\n}\nfunction isVisibleRules() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, _ref$except = _ref.except, except = _ref$except === undefined ? {\n notRendered: false,\n cssDisplay: false,\n cssVisibility: false,\n detailsElement: false,\n browsingContext: false\n } : _ref$except;\n var element = contextToElement({\n label: \"is/visible\",\n resolveDocument: true,\n context: context\n });\n var nodeName = element.nodeName.toLowerCase();\n if (!except.notRendered && notRenderedElementsPattern.test(nodeName)) {\n return true;\n }\n var _path = getParents({\n context: element\n });\n // in Internet Explorer <audio> has a default display: none, where others have display: inline\n // but IE allows focusing <audio style=\"display:none\">, but not <div display:none><audio>\n // this is irrelevant to other browsers, as the controls attribute is required to make <audio> focusable\n var isAudioWithoutControls = nodeName === \"audio\" && !element.hasAttribute(\"controls\");\n if (!except.cssDisplay && notDisplayed(isAudioWithoutControls ? _path.slice(1) : _path)) {\n return false;\n }\n if (!except.cssVisibility && notVisible(_path)) {\n return false;\n }\n if (!except.detailsElement && collapsedParent(_path)) {\n return false;\n }\n if (!except.browsingContext) {\n // elements within a browsing context are affected by the\n // browsing context host element's visibility and tabindex\n var frameElement = getFrameElement(element);\n var _isVisible = isVisibleRules.except(except);\n if (frameElement && !_isVisible(frameElement)) {\n return false;\n }\n }\n return true;\n}\n// bind exceptions to an iterator callback\nisVisibleRules.except = function() {\n var except = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var isVisible = function isVisible(context) {\n return isVisibleRules({\n context: context,\n except: except\n });\n };\n isVisible.rules = isVisibleRules;\n return isVisible;\n};\n// provide isVisible(context) as default iterator callback\nvar isVisible = isVisibleRules.except({});\nfunction getMapByName(name, _document) {\n // apparently getElementsByName() also considers id attribute in IE & opera\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByName\n var map = _document.querySelector('map[name=\"' + (0, _cssescape.default)(name) + '\"]');\n return map || null;\n}\nfunction getImageOfArea(element) {\n var map = element.parentElement;\n if (!map.name || map.nodeName.toLowerCase() !== \"map\") {\n return null;\n }\n // NOTE: image maps can also be applied to <object> with image content,\n // but no browser supports this at the moment\n // HTML5 specifies HTMLMapElement.images to be an HTMLCollection of all\n // <img> and <object> referencing the <map> element, but no browser implements this\n // https://www.w3.org/TR/html5/embedded-content-0.html#the-map-element\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement\n // the image must be valid and loaded for the map to take effect\n var _document = getDocument(element);\n return _document.querySelector('img[usemap=\"#' + (0, _cssescape.default)(map.name) + '\"]') || null;\n}\nvar supports$2 = void 0;\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\n// https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L88-L107\nfunction isValidArea(context) {\n if (!supports$2) {\n supports$2 = _supports();\n }\n var element = contextToElement({\n label: \"is/valid-area\",\n context: context\n });\n var nodeName = element.nodeName.toLowerCase();\n if (nodeName !== \"area\") {\n return false;\n }\n var hasTabindex = element.hasAttribute(\"tabindex\");\n if (!supports$2.focusAreaTabindex && hasTabindex) {\n // Blink and WebKit do not consider <area tabindex=\"-1\" href=\"#void\"> focusable\n return false;\n }\n var img = getImageOfArea(element);\n if (!img || !isVisible(img)) {\n return false;\n }\n // Firefox only allows fully loaded images to reference image maps\n // https://stereochro.me/ideas/detecting-broken-images-js\n if (!supports$2.focusBrokenImageMap && (!img.complete || !img.naturalHeight || img.offsetWidth <= 0 || img.offsetHeight <= 0)) {\n return false;\n }\n // Firefox supports.can focus area elements even if they don't have an href attribute\n if (!supports$2.focusAreaWithoutHref && !element.href) {\n // Internet explorer supports.can focus area elements without href if either\n // the area element or the image element has a tabindex attribute\n return supports$2.focusAreaTabindex && hasTabindex || supports$2.focusAreaImgTabindex && img.hasAttribute(\"tabindex\");\n }\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap\n var childOfInteractive = getParents({\n context: img\n }).slice(1).some(function(_element) {\n var name = _element.nodeName.toLowerCase();\n return name === \"button\" || name === \"a\";\n });\n if (childOfInteractive) {\n return false;\n }\n return true;\n}\nvar supports$3 = void 0;\n// https://www.w3.org/TR/html5/disabled-elements.html#concept-element-disabled\nvar disabledElementsPattern = void 0;\nvar disabledElements = {\n input: true,\n select: true,\n textarea: true,\n button: true,\n fieldset: true,\n form: true\n};\nfunction isNativeDisabledSupported(context) {\n if (!supports$3) {\n supports$3 = _supports();\n if (supports$3.focusFieldsetDisabled) {\n delete disabledElements.fieldset;\n }\n if (supports$3.focusFormDisabled) {\n delete disabledElements.form;\n }\n disabledElementsPattern = new RegExp(\"^(\" + Object.keys(disabledElements).join(\"|\") + \")$\");\n }\n var element = contextToElement({\n label: \"is/native-disabled-supported\",\n context: context\n });\n var nodeName = element.nodeName.toLowerCase();\n return Boolean(disabledElementsPattern.test(nodeName));\n}\nvar supports$4 = void 0;\nfunction isDisabledFieldset(element) {\n var nodeName = element.nodeName.toLowerCase();\n return nodeName === \"fieldset\" && element.disabled;\n}\nfunction isDisabledForm(element) {\n var nodeName = element.nodeName.toLowerCase();\n return nodeName === \"form\" && element.disabled;\n}\nfunction isDisabled(context) {\n if (!supports$4) {\n supports$4 = _supports();\n }\n var element = contextToElement({\n label: \"is/disabled\",\n context: context\n });\n if (element.hasAttribute(\"data-ally-disabled\")) {\n // treat ally's element/disabled like the DOM native element.disabled\n return true;\n }\n if (!isNativeDisabledSupported(element)) {\n // non-form elements do not support the disabled attribute\n return false;\n }\n if (element.disabled) {\n // the element itself is disabled\n return true;\n }\n var parents = getParents({\n context: element\n });\n if (parents.some(isDisabledFieldset)) {\n // a parental <fieldset> is disabld and inherits the state onto this element\n return true;\n }\n if (!supports$4.focusFormDisabled && parents.some(isDisabledForm)) {\n // a parental <form> is disabld and inherits the state onto this element\n return true;\n }\n return false;\n}\nfunction isOnlyTabbableRules() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, _ref$except = _ref.except, except = _ref$except === undefined ? {\n onlyFocusableBrowsingContext: false,\n visible: false\n } : _ref$except;\n var element = contextToElement({\n label: \"is/only-tabbable\",\n resolveDocument: true,\n context: context\n });\n if (!except.visible && !isVisible(element)) {\n return false;\n }\n if (!except.onlyFocusableBrowsingContext && (platform.is.GECKO || platform.is.TRIDENT || platform.is.EDGE)) {\n var frameElement = getFrameElement(element);\n if (frameElement) {\n if (tabindexValue(frameElement) < 0) {\n // iframe[tabindex=\"-1\"] and object[tabindex=\"-1\"] inherit the\n // tabbable demotion onto elements of their browsing contexts\n return false;\n }\n }\n }\n var nodeName = element.nodeName.toLowerCase();\n var tabindex = tabindexValue(element);\n if (nodeName === \"label\" && platform.is.GECKO) {\n // Firefox cannot focus, but tab to: label[tabindex=0]\n return tabindex !== null && tabindex >= 0;\n }\n // SVG Elements were keyboard focusable but not script focusable before Firefox 51.\n // Firefox 51 added the focus management DOM API (.focus and .blur) to SVGElement,\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=778654\n if (platform.is.GECKO && element.ownerSVGElement && !element.focus) {\n if (nodeName === \"a\" && element.hasAttribute(\"xlink:href\")) {\n // any focusable child of <svg> cannot be focused, but tabbed to\n if (platform.is.GECKO) {\n return true;\n }\n }\n }\n return false;\n}\n// bind exceptions to an iterator callback\nisOnlyTabbableRules.except = function() {\n var except = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var isOnlyTabbable = function isOnlyTabbable(context) {\n return isOnlyTabbableRules({\n context: context,\n except: except\n });\n };\n isOnlyTabbable.rules = isOnlyTabbableRules;\n return isOnlyTabbable;\n};\n// provide isOnlyTabbable(context) as default iterator callback\nvar isOnlyTabbable = isOnlyTabbableRules.except({});\nvar supports$5 = void 0;\nfunction isOnlyFocusRelevant(element) {\n var nodeName = element.nodeName.toLowerCase();\n if (nodeName === \"embed\" || nodeName === \"keygen\") {\n // embed is considered focus-relevant but not focusable\n // see https://github.com/medialize/ally.js/issues/82\n return true;\n }\n var _tabindex = tabindexValue(element);\n if (element.shadowRoot && _tabindex === null) {\n // ShadowDOM host elements *may* receive focus\n // even though they are not considered focuable\n return true;\n }\n if (nodeName === \"label\") {\n // <label tabindex=\"0\"> is only tabbable in Firefox, not script-focusable\n // there's no way to make an element focusable other than by adding a tabindex,\n // and focus behavior of the label element seems hard-wired to ignore tabindex\n // in some browsers (like Gecko, Blink and WebKit)\n return !supports$5.focusLabelTabindex || _tabindex === null;\n }\n if (nodeName === \"legend\") {\n return _tabindex === null;\n }\n if (supports$5.focusSvgFocusableAttribute && (element.ownerSVGElement || nodeName === \"svg\")) {\n // Internet Explorer understands the focusable attribute introduced in SVG Tiny 1.2\n var focusableAttribute = element.getAttribute(\"focusable\");\n return focusableAttribute && focusableAttribute === \"false\";\n }\n if (nodeName === \"img\" && element.hasAttribute(\"usemap\")) {\n // Gecko, Trident and Edge do not allow an image with an image map and tabindex to be focused,\n // it appears the tabindex is overruled so focus is still forwarded to the <map>\n return _tabindex === null || !supports$5.focusImgUsemapTabindex;\n }\n if (nodeName === \"area\") {\n // all <area>s are considered relevant,\n // but only the valid <area>s are focusable\n return !isValidArea(element);\n }\n return false;\n}\nfunction isFocusableRules() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, _ref$except = _ref.except, except = _ref$except === undefined ? {\n disabled: false,\n visible: false,\n onlyTabbable: false\n } : _ref$except;\n if (!supports$5) {\n supports$5 = _supports();\n }\n var _isOnlyTabbable = isOnlyTabbable.rules.except({\n onlyFocusableBrowsingContext: true,\n visible: except.visible\n });\n var element = contextToElement({\n label: \"is/focusable\",\n resolveDocument: true,\n context: context\n });\n var focusRelevant = isFocusRelevant.rules({\n context: element,\n except: except\n });\n if (!focusRelevant || isOnlyFocusRelevant(element)) {\n return false;\n }\n if (!except.disabled && isDisabled(element)) {\n return false;\n }\n if (!except.onlyTabbable && _isOnlyTabbable(element)) {\n // some elements may be keyboard focusable, but not script focusable\n return false;\n }\n // elements that are not rendered, cannot be focused\n if (!except.visible) {\n var visibilityOptions = {\n context: element,\n except: {}\n };\n if (supports$5.focusInHiddenIframe) {\n // WebKit and Blink can focus content in hidden <iframe> and <object>\n visibilityOptions.except.browsingContext = true;\n }\n if (supports$5.focusObjectSvgHidden) {\n // Blink allows focusing the object element, even if it has visibility: hidden;\n // @browser-issue Blink https://code.google.com/p/chromium/issues/detail?id=586191\n var _nodeName2 = element.nodeName.toLowerCase();\n if (_nodeName2 === \"object\") {\n visibilityOptions.except.cssVisibility = true;\n }\n }\n if (!isVisible.rules(visibilityOptions)) {\n return false;\n }\n }\n var frameElement = getFrameElement(element);\n if (frameElement) {\n var _nodeName = frameElement.nodeName.toLowerCase();\n if (_nodeName === \"object\" && !supports$5.focusInZeroDimensionObject) {\n if (!frameElement.offsetWidth || !frameElement.offsetHeight) {\n // WebKit can not focus content in <object> if it doesn't have dimensions\n return false;\n }\n }\n }\n var nodeName = element.nodeName.toLowerCase();\n if (nodeName === \"svg\" && supports$5.focusSvgInIframe && !frameElement && element.getAttribute(\"tabindex\") === null) {\n return false;\n }\n return true;\n}\n// bind exceptions to an iterator callback\nisFocusableRules.except = function() {\n var except = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var isFocusable = function isFocusable(context) {\n return isFocusableRules({\n context: context,\n except: except\n });\n };\n isFocusable.rules = isFocusableRules;\n return isFocusable;\n};\n// provide isFocusRelevant(context) as default iterator callback\nvar isFocusable = isFocusableRules.except({});\nfunction createFilter(condition) {\n // see https://developer.mozilla.org/en-US/docs/Web/API/NodeFilter\n var filter = function filter(node) {\n if (node.shadowRoot) {\n // return ShadowRoot elements regardless of them being focusable,\n // so they can be walked recursively later\n return NodeFilter.FILTER_ACCEPT;\n }\n if (condition(node)) {\n // finds elements that could have been found by document.querySelectorAll()\n return NodeFilter.FILTER_ACCEPT;\n }\n return NodeFilter.FILTER_SKIP;\n };\n // IE requires a function, Browsers require {acceptNode: function}\n // see http://www.bennadel.com/blog/2607-finding-html-comment-nodes-in-the-dom-using-treewalker.htm\n filter.acceptNode = filter;\n return filter;\n}\nvar PossiblyFocusableFilter = createFilter(isFocusRelevant);\nfunction queryFocusableStrict() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, includeContext = _ref.includeContext, includeOnlyTabbable = _ref.includeOnlyTabbable, strategy = _ref.strategy;\n if (!context) {\n context = document.documentElement;\n }\n var _isFocusable = isFocusable.rules.except({\n onlyTabbable: includeOnlyTabbable\n });\n var _document = getDocument(context);\n // see https://developer.mozilla.org/en-US/docs/Web/API/Document/createTreeWalker\n var walker = _document.createTreeWalker(context, NodeFilter.SHOW_ELEMENT, strategy === \"all\" ? PossiblyFocusableFilter : createFilter(_isFocusable), false);\n var list = [];\n while(walker.nextNode()){\n if (walker.currentNode.shadowRoot) {\n if (_isFocusable(walker.currentNode)) {\n list.push(walker.currentNode);\n }\n list = list.concat(queryFocusableStrict({\n context: walker.currentNode.shadowRoot,\n includeOnlyTabbable: includeOnlyTabbable,\n strategy: strategy\n }));\n } else {\n list.push(walker.currentNode);\n }\n }\n // add context if requested and focusable\n if (includeContext) {\n if (strategy === \"all\") {\n if (isFocusRelevant(context)) {\n list.unshift(context);\n }\n } else if (_isFocusable(context)) {\n list.unshift(context);\n }\n }\n return list;\n}\n// NOTE: this selector MUST *never* be used directly,\nvar supports$6 = void 0;\nvar selector$1 = void 0;\nfunction selector$2() {\n if (!supports$6) {\n supports$6 = _supports();\n }\n if (typeof selector$1 === \"string\") {\n return selector$1;\n }\n // https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n selector$1 = \"\" + // IE11 supports.can focus <table> and <td>\n (supports$6.focusTable ? \"table, td,\" : \"\") + // IE11 supports.can focus <fieldset>\n (supports$6.focusFieldset ? \"fieldset,\" : \"\") + // Namespace problems of [xlink:href] explained in https://stackoverflow.com/a/23047888/515124\n // svg a[*|href] does not match in IE9, but since we're filtering\n // through is/focusable we can include all <a> from SVG\n \"svg a,\" + // may behave as 'svg, svg *,' in chrome as *every* svg element with a focus event listener is focusable\n // navigational elements\n \"a[href],\" + // validity determined by is/valid-area.js\n \"area[href],\" + // validity determined by is/disabled.js\n \"input, select, textarea, button,\" + // browsing context containers\n \"iframe, object, embed,\" + // interactive content\n \"keygen,\" + (supports$6.focusAudioWithoutControls ? \"audio,\" : \"audio[controls],\") + (supports$6.focusVideoWithoutControls ? \"video,\" : \"video[controls],\") + (supports$6.focusSummary ? \"summary,\" : \"\") + // validity determined by is/valid-tabindex.js\n \"[tabindex],\" + // editing hosts\n \"[contenteditable]\";\n // where ShadowDOM is supported, we also want the shadowed focusable elements (via \">>>\" or \"/deep/\")\n selector$1 = selectInShadows(selector$1);\n return selector$1;\n}\nfunction queryFocusableQuick() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, includeContext = _ref.includeContext, includeOnlyTabbable = _ref.includeOnlyTabbable;\n var _selector = selector$2();\n var elements = context.querySelectorAll(_selector);\n // the selector potentially matches more than really is focusable\n var _isFocusable = isFocusable.rules.except({\n onlyTabbable: includeOnlyTabbable\n });\n var result = [].filter.call(elements, _isFocusable);\n // add context if requested and focusable\n if (includeContext && _isFocusable(context)) {\n result.unshift(context);\n }\n return result;\n}\nfunction queryFocusable() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, includeContext = _ref.includeContext, includeOnlyTabbable = _ref.includeOnlyTabbable, _ref$strategy = _ref.strategy, strategy = _ref$strategy === undefined ? \"quick\" : _ref$strategy;\n var element = contextToElement({\n label: \"query/focusable\",\n resolveDocument: true,\n defaultToDocument: true,\n context: context\n });\n var options = {\n context: element,\n includeContext: includeContext,\n includeOnlyTabbable: includeOnlyTabbable,\n strategy: strategy\n };\n if (strategy === \"quick\") {\n return queryFocusableQuick(options);\n } else if (strategy === \"strict\" || strategy === \"all\") {\n return queryFocusableStrict(options);\n }\n throw new TypeError('query/focusable requires option.strategy to be one of [\"quick\", \"strict\", \"all\"]');\n}\nvar supports$7 = void 0;\n// Internet Explorer 11 considers fieldset, table, td focusable, but not tabbable\n// Internet Explorer 11 considers body to have [tabindex=0], but does not allow tabbing to it\nvar focusableElementsPattern = /^(fieldset|table|td|body)$/;\nfunction isTabbableRules() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, _ref$except = _ref.except, except = _ref$except === undefined ? {\n flexbox: false,\n scrollable: false,\n shadow: false,\n visible: false,\n onlyTabbable: false\n } : _ref$except;\n if (!supports$7) {\n supports$7 = _supports();\n }\n var element = contextToElement({\n label: \"is/tabbable\",\n resolveDocument: true,\n context: context\n });\n if (platform.is.BLINK && platform.is.ANDROID && platform.majorVersion > 42) {\n // External keyboard support worked fine in CHrome 42, but stopped working in Chrome 45.\n // The on-screen keyboard does not provide a way to focus the next input element (like iOS does).\n // That leaves us with no option to advance focus by keyboard, ergo nothing is tabbable (keyboard focusable).\n return false;\n }\n var frameElement = getFrameElement(element);\n if (frameElement) {\n if (platform.is.WEBKIT && platform.is.IOS) {\n // iOS only does not consider anything from another browsing context keyboard focusable\n return false;\n }\n // iframe[tabindex=\"-1\"] and object[tabindex=\"-1\"] inherit the\n // tabbable demotion onto elements of their browsing contexts\n if (tabindexValue(frameElement) < 0) {\n return false;\n }\n if (!except.visible && (platform.is.BLINK || platform.is.WEBKIT) && !isVisible(frameElement)) {\n // Blink and WebKit consider elements in hidden browsing contexts focusable, but not tabbable\n return false;\n }\n // Webkit and Blink don't consider anything in <object> tabbable\n // Blink fixed that fixed in Chrome 54, Opera 41\n var frameNodeName = frameElement.nodeName.toLowerCase();\n if (frameNodeName === \"object\") {\n var isFixedBlink = platform.name === \"Chrome\" && platform.majorVersion >= 54 || platform.name === \"Opera\" && platform.majorVersion >= 41;\n if (platform.is.WEBKIT || platform.is.BLINK && !isFixedBlink) {\n return false;\n }\n }\n }\n var nodeName = element.nodeName.toLowerCase();\n var _tabindex = tabindexValue(element);\n var tabindex = _tabindex === null ? null : _tabindex >= 0;\n if (platform.is.EDGE && platform.majorVersion >= 14 && frameElement && element.ownerSVGElement && _tabindex < 0) {\n // Edge 14+ considers <a xlink:href=\"…\" tabindex=\"-1\"> keyboard focusable\n // if the element is in a nested browsing context\n return true;\n }\n var hasTabbableTabindexOrNone = tabindex !== false;\n var hasTabbableTabindex = _tabindex !== null && _tabindex >= 0;\n // NOTE: Firefox 31 considers [contenteditable] to have [tabindex=-1], but allows tabbing to it\n // fixed in Firefox 40 the latest - https://bugzilla.mozilla.org/show_bug.cgi?id=1185657\n if (element.hasAttribute(\"contenteditable\")) {\n // tabbing can still be disabled by explicitly providing [tabindex=\"-1\"]\n return hasTabbableTabindexOrNone;\n }\n if (focusableElementsPattern.test(nodeName) && tabindex !== true) {\n return false;\n }\n if (platform.is.WEBKIT && platform.is.IOS) {\n // iOS only considers a hand full of elements tabbable (keyboard focusable)\n // this holds true even with external keyboards\n var potentiallyTabbable = nodeName === \"input\" && element.type === \"text\" || element.type === \"password\" || nodeName === \"select\" || nodeName === \"textarea\" || element.hasAttribute(\"contenteditable\");\n if (!potentiallyTabbable) {\n var style = window.getComputedStyle(element, null);\n potentiallyTabbable = isUserModifyWritable(style);\n }\n if (!potentiallyTabbable) {\n return false;\n }\n }\n if (nodeName === \"use\" && _tabindex !== null) {\n if (platform.is.BLINK || platform.is.WEBKIT && platform.majorVersion === 9) {\n // In Chrome and Safari 9 the <use> element is keyboard focusable even for tabindex=\"-1\"\n return true;\n }\n }\n if (elementMatches(element, \"svg a\") && element.hasAttribute(\"xlink:href\")) {\n if (hasTabbableTabindexOrNone) {\n // in Trident and Gecko SVGElement does not handle the tabIndex property properly\n return true;\n }\n if (element.focus && !supports$7.focusSvgNegativeTabindexAttribute) {\n // Firefox 51 and 52 treat any natively tabbable SVG element with\n // tabindex=\"-1\" as tabbable and everything else as inert\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1302340\n return true;\n }\n }\n if (nodeName === \"svg\" && supports$7.focusSvgInIframe && hasTabbableTabindexOrNone) {\n return true;\n }\n if (platform.is.TRIDENT || platform.is.EDGE) {\n if (nodeName === \"svg\") {\n if (supports$7.focusSvg) {\n // older Internet Explorers consider <svg> keyboard focusable\n // unless they have focsable=\"false\", but then they wouldn't\n // be focusable and thus not even reach this filter\n return true;\n }\n // elements that have [focusable] are automatically keyboard focusable regardless of the attribute's value\n return element.hasAttribute(\"focusable\") || hasTabbableTabindex;\n }\n if (element.ownerSVGElement) {\n if (supports$7.focusSvgTabindexAttribute && hasTabbableTabindex) {\n return true;\n }\n // elements that have [focusable] are automatically keyboard focusable regardless of the attribute's value\n return element.hasAttribute(\"focusable\");\n }\n }\n if (element.tabIndex === undefined) {\n return Boolean(except.onlyTabbable);\n }\n if (nodeName === \"audio\") {\n if (!element.hasAttribute(\"controls\")) {\n // In Internet Explorer the <audio> element is focusable, but not tabbable, and tabIndex property is wrong\n return false;\n } else if (platform.is.BLINK) {\n // In Chrome <audio controls tabindex=\"-1\"> remains keyboard focusable\n return true;\n }\n }\n if (nodeName === \"video\") {\n if (!element.hasAttribute(\"controls\")) {\n if (platform.is.TRIDENT || platform.is.EDGE) {\n // In Internet Explorer and Edge the <video> element is focusable, but not tabbable, and tabIndex property is wrong\n return false;\n }\n } else if (platform.is.BLINK || platform.is.GECKO) {\n // In Chrome and Firefox <video controls tabindex=\"-1\"> remains keyboard focusable\n return true;\n }\n }\n if (nodeName === \"object\") {\n if (platform.is.BLINK || platform.is.WEBKIT) {\n // In all Blink and WebKit based browsers <embed> and <object> are never keyboard focusable, even with tabindex=\"0\" set\n return false;\n }\n }\n if (nodeName === \"iframe\") {\n // In Internet Explorer all iframes are only focusable\n // In WebKit, Blink and Gecko iframes may be tabbable depending on content.\n // Since we can't reliably investigate iframe documents because of the\n // SameOriginPolicy, we're declaring everything only focusable.\n return false;\n }\n if (!except.scrollable && platform.is.GECKO) {\n // Firefox considers scrollable containers keyboard focusable,\n // even though their tabIndex property is -1\n var _style = window.getComputedStyle(element, null);\n if (hasCssOverflowScroll(_style)) {\n return hasTabbableTabindexOrNone;\n }\n }\n if (platform.is.TRIDENT || platform.is.EDGE) {\n // IE and Edge degrade <area> to script focusable, if the image\n // using the <map> has been given tabindex=\"-1\"\n if (nodeName === \"area\") {\n var img = getImageOfArea(element);\n if (img && tabindexValue(img) < 0) {\n return false;\n }\n }\n var _style2 = window.getComputedStyle(element, null);\n if (isUserModifyWritable(_style2)) {\n // prevent being swallowed by the overzealous isScrollableContainer() below\n return element.tabIndex >= 0;\n }\n if (!except.flexbox && hasCssDisplayFlex(_style2)) {\n if (_tabindex !== null) {\n return hasTabbableTabindex;\n }\n return isFocusRelevantWithoutFlexbox(element) && isTabbableWithoutFlexbox(element);\n }\n // IE considers scrollable containers script focusable only,\n // even though their tabIndex property is 0\n if (isScrollableContainer(element, nodeName)) {\n return false;\n }\n var parent = element.parentElement;\n if (parent) {\n var parentNodeName = parent.nodeName.toLowerCase();\n var parentStyle = window.getComputedStyle(parent, null);\n // IE considers scrollable bodies script focusable only,\n if (isScrollableContainer(parent, nodeName, parentNodeName, parentStyle)) {\n return false;\n }\n // Children of focusable elements with display:flex are focusable in IE10-11,\n // even though their tabIndex property suggests otherwise\n if (hasCssDisplayFlex(parentStyle)) {\n // value of tabindex takes precedence\n return hasTabbableTabindex;\n }\n }\n }\n // https://www.w3.org/WAI/PF/aria-practices/#focus_tabindex\n return element.tabIndex >= 0;\n}\n// bind exceptions to an iterator callback\nisTabbableRules.except = function() {\n var except = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var isTabbable = function isTabbable(context) {\n return isTabbableRules({\n context: context,\n except: except\n });\n };\n isTabbable.rules = isTabbableRules;\n return isTabbable;\n};\nvar isFocusRelevantWithoutFlexbox = isFocusRelevant.rules.except({\n flexbox: true\n});\nvar isTabbableWithoutFlexbox = isTabbableRules.except({\n flexbox: true\n});\n// provide isTabbable(context) as default iterator callback\nvar isTabbable = isTabbableRules.except({});\nfunction queryTabbable() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, includeContext = _ref.includeContext, includeOnlyTabbable = _ref.includeOnlyTabbable, strategy = _ref.strategy;\n var _isTabbable = isTabbable.rules.except({\n onlyTabbable: includeOnlyTabbable\n });\n return queryFocusable({\n context: context,\n includeContext: includeContext,\n includeOnlyTabbable: includeOnlyTabbable,\n strategy: strategy\n }).filter(_isTabbable);\n}\n// sorts a list of elements according to their order in the DOM\nfunction compareDomPosition(a, b) {\n return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n}\nfunction sortDomOrder(elements) {\n return elements.sort(compareDomPosition);\n}\nfunction getFirstSuccessorOffset(list, target) {\n // find the first element that comes AFTER the target element\n return findIndex(list, function(element) {\n return target.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING;\n });\n}\nfunction findInsertionOffsets(list, elements, resolveElement) {\n // instead of mutating the elements list directly, remember position and map\n // to inject later, when we can do this more efficiently\n var insertions = [];\n elements.forEach(function(element) {\n var replace = true;\n var offset = list.indexOf(element);\n if (offset === -1) {\n // element is not in target list\n offset = getFirstSuccessorOffset(list, element);\n replace = false;\n }\n if (offset === -1) {\n // there is no successor in the tabsequence,\n // meaning the image must be the last element\n offset = list.length;\n }\n // allow the consumer to replace the injected element\n var injections = nodeArray(resolveElement ? resolveElement(element) : element);\n if (!injections.length) {\n // we can't inject zero elements\n return;\n }\n insertions.push({\n offset: offset,\n replace: replace,\n elements: injections\n });\n });\n return insertions;\n}\nfunction insertElementsAtOffsets(list, insertions) {\n // remember the number of elements we have already injected\n // so we account for the caused index offset\n var inserted = 0;\n // make sure that we insert the elements in sequence,\n // otherwise the offset compensation won't work\n insertions.sort(function(a, b) {\n return a.offset - b.offset;\n });\n insertions.forEach(function(insertion) {\n // array.splice has an annoying function signature :(\n var remove = insertion.replace ? 1 : 0;\n var args = [\n insertion.offset + inserted,\n remove\n ].concat(insertion.elements);\n list.splice.apply(list, args);\n inserted += insertion.elements.length - remove;\n });\n}\nfunction mergeInDomOrder() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, list = _ref.list, elements = _ref.elements, resolveElement = _ref.resolveElement;\n // operate on a copy so we don't mutate the original array\n var _list = list.slice(0);\n // make sure the elements we're injecting are provided in DOM order\n var _elements = nodeArray(elements).slice(0);\n sortDomOrder(_elements);\n // find the offsets within the target array (list) at which to inject\n // each individual element (from elements)\n var insertions = findInsertionOffsets(_list, _elements, resolveElement);\n // actually inject the elements into the target array at the identified positions\n insertElementsAtOffsets(_list, insertions);\n return _list;\n}\nvar _createClass = function() {\n function defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar Maps = function() {\n function Maps(context) {\n _classCallCheck(this, Maps);\n this._document = getDocument(context);\n this.maps = {};\n }\n _createClass(Maps, [\n {\n key: \"getAreasFor\",\n value: function getAreasFor(name) {\n if (!this.maps[name]) {\n // the map is not defined within the context, so we\n // have to go find it elsewhere in the document\n this.addMapByName(name);\n }\n return this.maps[name];\n }\n },\n {\n key: \"addMapByName\",\n value: function addMapByName(name) {\n var map = getMapByName(name, this._document);\n if (!map) {\n // if there is no map, the img[usemap] wasn't doing anything anyway\n return;\n }\n this.maps[map.name] = queryTabbable({\n context: map\n });\n }\n },\n {\n key: \"extractAreasFromList\",\n value: function extractAreasFromList(elements) {\n // remove all <area> elements from the elements list,\n // but put them the map for later retrieval\n return elements.filter(function(element) {\n var nodeName = element.nodeName.toLowerCase();\n if (nodeName !== \"area\") {\n return true;\n }\n var map = element.parentNode;\n if (!this.maps[map.name]) {\n this.maps[map.name] = [];\n }\n this.maps[map.name].push(element);\n return false;\n }, this);\n }\n }\n ]);\n return Maps;\n}();\nfunction sortArea(elements, context) {\n // images - unless they are focusable themselves, likely not\n // part of the elements list, so we'll have to find them and\n // sort them into the elements list manually\n var usemaps = context.querySelectorAll(\"img[usemap]\");\n var maps = new Maps(context);\n // remove all <area> elements from the elements list,\n // but put them the map for later retrieval\n var _elements = maps.extractAreasFromList(elements);\n if (!usemaps.length) {\n // the context does not contain any <area>s so no need\n // to replace anything, just remove any maps\n return _elements;\n }\n return mergeInDomOrder({\n list: _elements,\n elements: usemaps,\n resolveElement: function resolveElement(image) {\n var name = image.getAttribute(\"usemap\").slice(1);\n return maps.getAreasFor(name);\n }\n });\n}\nvar _createClass$1 = function() {\n function defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck$1(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar Shadows = function() {\n function Shadows(context, sortElements) {\n _classCallCheck$1(this, Shadows);\n // document context we're working with\n this.context = context;\n // callback that sorts an array of elements\n this.sortElements = sortElements;\n // reference to create unique IDs for each ShadowHost\n this.hostCounter = 1;\n // reference map for child-ShadowHosts of a ShadowHost\n this.inHost = {};\n // reference map for child-ShadowHost of the document\n this.inDocument = [];\n // reference map for ShadowHosts\n this.hosts = {};\n // reference map for tabbable elements of a ShadowHost\n this.elements = {};\n }\n // remember which hosts we have to sort within later\n _createClass$1(Shadows, [\n {\n key: \"_registerHost\",\n value: function _registerHost(host) {\n if (host._sortingId) {\n return;\n }\n // make the ShadowHost identifiable (see cleanup() for undo)\n host._sortingId = \"shadow-\" + this.hostCounter++;\n this.hosts[host._sortingId] = host;\n // hosts may contain other hosts\n var parentHost = getShadowHost({\n context: host\n });\n if (parentHost) {\n this._registerHost(parentHost);\n this._registerHostParent(host, parentHost);\n } else {\n this.inDocument.push(host);\n }\n }\n },\n {\n key: \"_registerHostParent\",\n value: function _registerHostParent(host, parent) {\n if (!this.inHost[parent._sortingId]) {\n this.inHost[parent._sortingId] = [];\n }\n this.inHost[parent._sortingId].push(host);\n }\n },\n {\n key: \"_registerElement\",\n value: function _registerElement(element, host) {\n if (!this.elements[host._sortingId]) {\n this.elements[host._sortingId] = [];\n }\n this.elements[host._sortingId].push(element);\n }\n },\n {\n key: \"extractElements\",\n value: function extractElements(elements) {\n return elements.filter(function(element) {\n var host = getShadowHost({\n context: element\n });\n if (!host) {\n return true;\n }\n this._registerHost(host);\n this._registerElement(element, host);\n return false;\n }, this);\n }\n },\n {\n key: \"sort\",\n value: function sort(elements) {\n var _elements = this._injectHosts(elements);\n _elements = this._replaceHosts(_elements);\n this._cleanup();\n return _elements;\n }\n },\n {\n key: \"_injectHosts\",\n value: function _injectHosts(elements) {\n Object.keys(this.hosts).forEach(function(_sortingId) {\n var _list = this.elements[_sortingId];\n var _elements = this.inHost[_sortingId];\n var _context = this.hosts[_sortingId].shadowRoot;\n this.elements[_sortingId] = this._merge(_list, _elements, _context);\n }, this);\n return this._merge(elements, this.inDocument, this.context);\n }\n },\n {\n key: \"_merge\",\n value: function _merge(list, elements, context) {\n var merged = mergeInDomOrder({\n list: list,\n elements: elements\n });\n return this.sortElements(merged, context);\n }\n },\n {\n key: \"_replaceHosts\",\n value: function _replaceHosts(elements) {\n return mergeInDomOrder({\n list: elements,\n elements: this.inDocument,\n resolveElement: this._resolveHostElement.bind(this)\n });\n }\n },\n {\n key: \"_resolveHostElement\",\n value: function _resolveHostElement(host) {\n var merged = mergeInDomOrder({\n list: this.elements[host._sortingId],\n elements: this.inHost[host._sortingId],\n resolveElement: this._resolveHostElement.bind(this)\n });\n var _tabindex = tabindexValue(host);\n if (_tabindex !== null && _tabindex > -1) {\n return [\n host\n ].concat(merged);\n }\n return merged;\n }\n },\n {\n key: \"_cleanup\",\n value: function _cleanup() {\n // remove those identifers we put on the ShadowHost to avoid using Map()\n Object.keys(this.hosts).forEach(function(key) {\n delete this.hosts[key]._sortingId;\n }, this);\n }\n }\n ]);\n return Shadows;\n}();\nfunction sortShadowed(elements, context, sortElements) {\n var shadows = new Shadows(context, sortElements);\n var _elements = shadows.extractElements(elements);\n if (_elements.length === elements.length) {\n // no shadowed content found, no need to continue\n return sortElements(elements);\n }\n return shadows.sort(_elements);\n}\nfunction sortTabindex(elements) {\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.tabIndex\n // elements with tabIndex \"0\" (including tabbableElements without tabIndex) should be navigated in the order they appear.\n // elements with a positive tabIndex:\n // Elements that have identical tabIndexes should be navigated in the order they appear.\n // Navigation proceeds from the lowest tabIndex to the highest tabIndex.\n // NOTE: sort implementation may be unstable and thus mess up DOM order,\n // that's why we build a map that's being sorted instead. If we were able to rely\n // on a stable sorting algorithm, sortTabindex() could be as simple as\n // elements.sort(function(a, b) { return a.tabIndex - b.tabIndex; });\n // at this time Chrome does not use a stable sorting algorithm\n // see http://blog.rodneyrehm.de/archives/14-Sorting-Were-Doing-It-Wrong.html#stability\n // NOTE: compareDocumentPosition seemed like more overhead than just sorting this with buckets\n // https://developer.mozilla.org/en-US/docs/Web/API/Node.compareDocumentPosition\n var map = {};\n var indexes = [];\n var normal = elements.filter(function(element) {\n // in Trident and Gecko SVGElement does not know about the tabIndex property\n var tabIndex = element.tabIndex;\n if (tabIndex === undefined) {\n tabIndex = tabindexValue(element);\n }\n // extract elements that don't need sorting\n if (tabIndex <= 0 || tabIndex === null || tabIndex === undefined) {\n return true;\n }\n if (!map[tabIndex]) {\n // create sortable bucket for dom-order-preservation of elements with the same tabIndex\n map[tabIndex] = [];\n // maintain a list of unique tabIndexes\n indexes.push(tabIndex);\n }\n // sort element into the proper bucket\n map[tabIndex].push(element);\n // element moved to sorting map, so not \"normal\" anymore\n return false;\n });\n // sort the tabindex ascending,\n // then resolve them to their appropriate buckets,\n // then flatten the array of arrays to an array\n var _elements = indexes.sort().map(function(tabIndex) {\n return map[tabIndex];\n }).reduceRight(function(previous, current) {\n return current.concat(previous);\n }, normal);\n return _elements;\n}\nvar supports$8 = void 0;\nfunction moveContextToBeginning(elements, context) {\n var pos = elements.indexOf(context);\n if (pos > 0) {\n var tmp = elements.splice(pos, 1);\n return tmp.concat(elements);\n }\n return elements;\n}\nfunction sortElements(elements, _context) {\n if (supports$8.tabsequenceAreaAtImgPosition) {\n // Some browsers sort <area> in DOM order, some place the <area>s\n // where the <img> referecing them would've been in DOM order.\n // https://github.com/medialize/ally.js/issues/5\n elements = sortArea(elements, _context);\n }\n elements = sortTabindex(elements);\n return elements;\n}\nfunction queryTabsequence() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, context = _ref.context, includeContext = _ref.includeContext, includeOnlyTabbable = _ref.includeOnlyTabbable, strategy = _ref.strategy;\n if (!supports$8) {\n supports$8 = _supports();\n }\n var _context = nodeArray(context)[0] || document.documentElement;\n var elements = queryTabbable({\n context: _context,\n includeContext: includeContext,\n includeOnlyTabbable: includeOnlyTabbable,\n strategy: strategy\n });\n if (document.body.createShadowRoot && platform.is.BLINK) {\n // sort tabindex localized to shadow dom\n // see https://github.com/medialize/ally.js/issues/6\n elements = sortShadowed(elements, _context, sortElements);\n } else {\n elements = sortElements(elements, _context);\n }\n if (includeContext) {\n // if we include the context itself, it has to be the first\n // element of the sequence\n elements = moveContextToBeginning(elements, _context);\n }\n return elements;\n}\n// codes mostly cloned from https://github.com/keithamus/jwerty/blob/master/jwerty.js\n// deliberately not exposing characters like <,.-#* because they vary *wildly*\n// across keyboard layouts and may cause various problems\n// (e.g. \"*\" is \"Shift +\" on a German Mac keyboard)\n// (e.g. \"@\" is \"Alt L\" on a German Mac keyboard)\nvar keycode = {\n // Element Focus\n tab: 9,\n // Navigation\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n pageUp: 33,\n \"page-up\": 33,\n pageDown: 34,\n \"page-down\": 34,\n end: 35,\n home: 36,\n // Action\n enter: 13,\n escape: 27,\n space: 32,\n // Modifier\n shift: 16,\n capsLock: 20,\n \"caps-lock\": 20,\n ctrl: 17,\n alt: 18,\n meta: 91,\n // in firefox: 224\n // on mac (chrome): meta-left=91, meta-right=93\n // on win (IE11): meta-left=91, meta-right=92\n pause: 19,\n // Content Manipulation\n insert: 45,\n delete: 46,\n backspace: 8,\n // the same logical key may be identified through different keyCodes\n _alias: {\n 91: [\n 92,\n 93,\n 224\n ]\n }\n};\n// Function keys (112 - 137)\n// NOTE: not every keyboard knows F13+\nfor(var n = 1; n < 26; n++){\n keycode[\"f\" + n] = n + 111;\n}\n// Number keys (48-57, numpad 96-105)\n// NOTE: not every keyboard knows num-0+\nfor(var _n = 0; _n < 10; _n++){\n var code = _n + 48;\n var numCode = _n + 96;\n keycode[_n] = code;\n keycode[\"num-\" + _n] = numCode;\n keycode._alias[code] = [\n numCode\n ];\n}\n// Latin characters (65 - 90)\nfor(var _n2 = 0; _n2 < 26; _n2++){\n var _code = _n2 + 65;\n var name$1 = String.fromCharCode(_code).toLowerCase();\n keycode[name$1] = _code;\n}\nvar modifier = {\n alt: \"altKey\",\n ctrl: \"ctrlKey\",\n meta: \"metaKey\",\n shift: \"shiftKey\"\n};\nvar modifierSequence = Object.keys(modifier).map(function(name) {\n return modifier[name];\n});\nfunction createExpectedModifiers(ignoreModifiers) {\n var value = ignoreModifiers ? null : false;\n return {\n altKey: value,\n ctrlKey: value,\n metaKey: value,\n shiftKey: value\n };\n}\nfunction resolveModifiers(modifiers) {\n var ignoreModifiers = modifiers.indexOf(\"*\") !== -1;\n var expected = createExpectedModifiers(ignoreModifiers);\n modifiers.forEach(function(token) {\n if (token === \"*\") {\n // we've already covered the all-in operator\n return;\n }\n // we want the modifier pressed\n var value = true;\n var operator = token.slice(0, 1);\n if (operator === \"?\") {\n // we don't care if the modifier is pressed\n value = null;\n } else if (operator === \"!\") {\n // we do not want the modifier pressed\n value = false;\n }\n if (value !== true) {\n // compensate for the modifier's operator\n token = token.slice(1);\n }\n var propertyName = modifier[token];\n if (!propertyName) {\n throw new TypeError('Unknown modifier \"' + token + '\"');\n }\n expected[propertyName] = value;\n });\n return expected;\n}\nfunction resolveKey(key) {\n var code = keycode[key] || parseInt(key, 10);\n if (!code || typeof code !== \"number\" || isNaN(code)) {\n throw new TypeError('Unknown key \"' + key + '\"');\n }\n return [\n code\n ].concat(keycode._alias[code] || []);\n}\nfunction matchModifiers(expected, event) {\n // returns true on match\n return !modifierSequence.some(function(prop) {\n // returns true on mismatch\n return typeof expected[prop] === \"boolean\" && Boolean(event[prop]) !== expected[prop];\n });\n}\nfunction keyBinding(text) {\n return text.split(/\\s+/).map(function(_text) {\n var tokens = _text.split(\"+\");\n var _modifiers = resolveModifiers(tokens.slice(0, -1));\n var _keyCodes = resolveKey(tokens.slice(-1));\n return {\n keyCodes: _keyCodes,\n modifiers: _modifiers,\n matchModifiers: matchModifiers.bind(null, _modifiers)\n };\n });\n}\n// Node.compareDocumentPosition is available since IE9\n// see https://developer.mozilla.org/en-US/docs/Web/API/Node.compareDocumentPosition\n// callback returns true when element is contained by parent or is the parent suited for use with Array.some()\n/*\n USAGE:\n var isChildOf = getParentComparator({parent: someNode});\n listOfElements.some(isChildOf)\n*/ function getParentComparator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, parent = _ref.parent, element = _ref.element, includeSelf = _ref.includeSelf;\n if (parent) {\n return function isChildOf(node) {\n return Boolean(includeSelf && node === parent || parent.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY);\n };\n } else if (element) {\n return function isParentOf(node) {\n return Boolean(includeSelf && element === node || node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY);\n };\n }\n throw new TypeError(\"util/compare-position#getParentComparator required either options.parent or options.element\");\n}\n// Bug 286933 - Key events in the autocomplete popup should be hidden from page scripts\n// @browser-issue Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=286933\nfunction whenKey() {\n var map = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var bindings = {};\n var context = nodeArray(map.context)[0] || document.documentElement;\n delete map.context;\n var filter = nodeArray(map.filter);\n delete map.filter;\n var mapKeys = Object.keys(map);\n if (!mapKeys.length) {\n throw new TypeError(\"when/key requires at least one option key\");\n }\n var registerBinding = function registerBinding(event) {\n event.keyCodes.forEach(function(code) {\n if (!bindings[code]) {\n bindings[code] = [];\n }\n bindings[code].push(event);\n });\n };\n mapKeys.forEach(function(text) {\n if (typeof map[text] !== \"function\") {\n throw new TypeError('when/key requires option[\"' + text + '\"] to be a function');\n }\n var addCallback = function addCallback(event) {\n event.callback = map[text];\n return event;\n };\n keyBinding(text).map(addCallback).forEach(registerBinding);\n });\n var handleKeyDown = function handleKeyDown(event) {\n if (event.defaultPrevented) {\n return;\n }\n if (filter.length) {\n // ignore elements within the exempted sub-trees\n var isParentOfElement = getParentComparator({\n element: event.target,\n includeSelf: true\n });\n if (filter.some(isParentOfElement)) {\n return;\n }\n }\n var key = event.keyCode || event.which;\n if (!bindings[key]) {\n return;\n }\n bindings[key].forEach(function(_event) {\n if (!_event.matchModifiers(event)) {\n return;\n }\n _event.callback.call(context, event, disengage);\n });\n };\n context.addEventListener(\"keydown\", handleKeyDown, false);\n var disengage = function disengage() {\n context.removeEventListener(\"keydown\", handleKeyDown, false);\n };\n return {\n disengage: disengage\n };\n}\nfunction _default(param) {\n let { context } = param === void 0 ? {} : param;\n if (!context) {\n context = document.documentElement;\n }\n // Make sure the supports tests are run before intercepting the Tab key,\n // or IE10 and IE11 will fail to process the first Tab key event. Not\n // limiting this warm-up to IE because it may be a problem elsewhere, too.\n queryTabsequence();\n return whenKey({\n // Safari on OSX may require ALT+TAB to reach links,\n // see https://github.com/medialize/ally.js/issues/146\n \"?alt+?shift+tab\": function altShiftTab(event) {\n // we're completely taking over the Tab key handling\n event.preventDefault();\n var sequence = queryTabsequence({\n context: context\n });\n var backward = event.shiftKey;\n var first = sequence[0];\n var last = sequence[sequence.length - 1];\n // wrap around first to last, last to first\n var source = backward ? first : last;\n var target = backward ? last : first;\n if (isActiveElement(source)) {\n target.focus();\n return;\n }\n // find current position in tabsequence\n var currentIndex = void 0;\n var found = sequence.some(function(element, index) {\n if (!isActiveElement(element)) {\n return false;\n }\n currentIndex = index;\n return true;\n });\n if (!found) {\n // redirect to first as we're not in our tabsequence\n first.focus();\n return;\n }\n // shift focus to previous/next element in the sequence\n var offset = backward ? -1 : 1;\n sequence[currentIndex + offset].focus();\n }\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=maintain--tab-focus.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL092ZXJsYXkvbWFpbnRhaW4tLXRhYi1mb2N1cy5qcyIsIm1hcHBpbmdzIjoiQUFBQSxrQkFBa0IsR0FBRyxjQUFjO0FBQ25DLG1EQUFtRDtBQUNuRCxlQUFlO0FBQ2YsaUNBQWlDO0FBQ2pDLEVBQUU7QUFDRix5Q0FBeUM7QUFDNUI7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDJDQUEwQztJQUN0Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDJCQUEyQkMsbUJBQU9BLENBQUMseUhBQXlDO0FBQ2xGLE1BQU1DLFlBQVksV0FBVyxHQUFHRix5QkFBeUJHLENBQUMsQ0FBQ0YsbUJBQU9BLENBQUMsd0dBQTZCO0FBQ2hHLE1BQU1HLGFBQWEsV0FBVyxHQUFHSix5QkFBeUJHLENBQUMsQ0FBQ0YsbUJBQU9BLENBQUMsOEdBQStCO0FBQ25HLHlGQUF5RjtBQUN6Riw2RUFBNkU7QUFDN0UsU0FBU0ksVUFBVUMsS0FBSztJQUNwQixJQUFJLENBQUNBLE9BQU87UUFDUixPQUFPLEVBQUU7SUFDYjtJQUNBLElBQUlDLE1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ZlIHRvIGdvIGZpbmQgaXQgZWxzZXdoZXJlIGluIHRoZSBkb2N1bWVudFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZE1hcEJ5TmFtZShuYW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubWFwc1tuYW1lXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAga2V5OiBcImFkZE1hcEJ5TmFtZVwiLFxuICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGFkZE1hcEJ5TmFtZShuYW1lKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hcCA9IGdldE1hcEJ5TmFtZShuYW1lLCB0aGlzLl9kb2N1bWVudCk7XG4gICAgICAgICAgICAgICAgaWYgKCFtYXApIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlcmUgaXMgbm8gbWFwLCB0aGUgaW1nW3VzZW1hcF0gd2Fzbid0IGRvaW5nIGFueXRoaW5nIGFueXdheVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMubWFwc1ttYXAubmFtZV0gPSBxdWVyeVRhYmJhYmxlKHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dDogbWFwXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJleHRyYWN0QXJlYXNGcm9tTGlzdFwiLFxuICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGV4dHJhY3RBcmVhc0Zyb21MaXN0KGVsZW1lbnRzKSB7XG4gICAgICAgICAgICAgICAgLy8gcmVtb3ZlIGFsbCA8YXJlYT4gZWxlbWVudHMgZnJvbSB0aGUgZWxlbWVudHMgbGlzdCxcbiAgICAgICAgICAgICAgICAvLyBidXQgcHV0IHRoZW0gdGhlIG1hcCBmb3IgbGF0ZXIgcmV0cmlldmFsXG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnRzLmZpbHRlcihmdW5jdGlvbihlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBub2RlTmFtZSA9IGVsZW1lbnQubm9kZU5hbWUudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGVOYW1lICE9PSBcImFyZWFcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIG1hcCA9IGVsZW1lbnQucGFyZW50Tm9kZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLm1hcHNbbWFwLm5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hcHNbbWFwLm5hbWVdID0gW107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXBzW21hcC5uYW1lXS5wdXNoKGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICBdKTtcbiAgICByZXR1cm4gTWFwcztcbn0oKTtcbmZ1bmN0aW9uIHNvcnRBcmVhKGVsZW1lbnRzLCBjb250ZXh0KSB7XG4gICAgLy8gaW1hZ2VzIC0gdW5sZXNzIHRoZXkgYXJlIGZvY3VzYWJsZSB0aGVtc2VsdmVzLCBsaWtlbHkgbm90XG4gICAgLy8gcGFydCBvZiB0aGUgZWxlbWVudHMgbGlzdCwgc28gd2UnbGwgaGF2ZSB0byBmaW5kIHRoZW0gYW5kXG4gICAgLy8gc29ydCB0aGVtIGludG8gdGhlIGVsZW1lbnRzIGxpc3QgbWFudWFsbHlcbiAgICB2YXIgdXNlbW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ICAgIHZhbHVlOiBmdW5jdGlvbiBfcmVnaXN0ZXJIb3N0KGhvc3QpIHtcbiAgICAgICAgICAgICAgICBpZiAoaG9zdC5fc29ydGluZ0lkKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gbWFrZSB0aGUgU2hhZG93SG9zdCBpZGVudGlmaWFibGUgKHNlZSBjbGVhbnVwKCkgZm9yIHVuZG8pXG4gICAgICAgICAgICAgICAgaG9zdC5fc29ydGluZ0lkID0gXCJzaGFkb3ctXCIgKyB0aGlzLmhvc3RDb3VudGVyKys7XG4gICAgICAgICAgICAgICAgdGhpcy5ob3N0c1tob3N0Ll9zb3J0aW5nSWRdID0gaG9zdDtcbiAgICAgICAgICAgICAgICAvLyBob3N0cyBtYXkgY29udGFpbiBvdGhlciBob3N0c1xuICAgICAgICAgICAgICAgIHZhciBwYXJlbnRIb3N0ID0gZ2V0U2hhZG93SG9zdCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQ6IGhvc3RcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAocGFyZW50SG9zdCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZWdpc3Rlckhvc3QocGFyZW50SG9zdCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlZ2lzdGVySG9zdFBhcmVudChob3N0LCBwYXJlbnRIb3N0KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluRG9jdW1lbnQucHVzaChob3N0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfcmVnaXN0ZXJIb3N0UGFyZW50XCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3JlZ2lzdGVySG9zdFBhcmVudChob3N0LCBwYXJlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaW5Ib3N0W3BhcmVudC5fc29ydGluZ0lkXSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluSG9zdFtwYXJlbnQuX3NvcnRpbmdJZF0gPSBbXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5pbkhvc3RbcGFyZW50Ll9zb3J0aW5nSWRdLnB1c2goaG9zdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfcmVnaXN0ZXJFbGVtZW50XCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3JlZ2lzdGVyRWxlbWVudChlbGVtZW50LCBob3N0KSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmVsZW1lbnRzW2hvc3QuX3NvcnRpbmdJZF0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50c1tob3N0Ll9zb3J0aW5nSWRdID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudHNbaG9zdC5fc29ydGluZ0lkXS5wdXNoKGVsZW1lbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBrZXk6IFwiZXh0cmFjdEVsZW1lbnRzXCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZXh0cmFjdEVsZW1lbnRzKGVsZW1lbnRzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnRzLmZpbHRlcihmdW5jdGlvbihlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBob3N0ID0gZ2V0U2hhZG93SG9zdCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiBlbGVtZW50XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWhvc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlZ2lzdGVySG9zdChob3N0KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVnaXN0ZXJFbGVtZW50KGVsZW1lbnQsIGhvc3QpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJzb3J0XCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gc29ydChlbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHZhciBfZWxlbWVudHMgPSB0aGlzLl9pbmplY3RIb3N0cyhlbGVtZW50cyk7XG4gICAgICAgICAgICAgICAgX2VsZW1lbnRzID0gdGhpcy5fcmVwbGFjZUhvc3RzKF9lbGVtZW50cyk7XG4gICAgICAgICAgICAgICAgdGhpcy5fY2xlYW51cCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBfZWxlbWVudHM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfaW5qZWN0SG9zdHNcIixcbiAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBfaW5qZWN0SG9zdHMoZWxlbWVudHMpIHtcbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0aGlzLmhvc3RzKS5mb3JFYWNoKGZ1bmN0aW9uKF9zb3J0aW5nSWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9saXN0ID0gdGhpcy5lbGVtZW50c1tfc29ydGluZ0lkXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9lbGVtZW50cyA9IHRoaXMuaW5Ib3N0W19zb3J0aW5nSWRdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgX2NvbnRleHQgPSB0aGlzLmhvc3RzW19zb3J0aW5nSWRdLnNoYWRvd1Jvb3Q7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudHNbX3NvcnRpbmdJZF0gPSB0aGlzLl9tZXJnZShfbGlzdCwgX2VsZW1lbnRzLCBfY29udGV4dCk7XG4gICAgICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21lcmdlKGVsZW1lbnRzLCB0aGlzLmluRG9jdW1lbnQsIHRoaXMuY29udGV4dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfbWVyZ2VcIixcbiAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBfbWVyZ2UobGlzdCwgZWxlbWVudHMsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICB2YXIgbWVyZ2VkID0gbWVyZ2VJbkRvbU9yZGVyKHtcbiAgICAgICAgICAgICAgICAgICAgbGlzdDogbGlzdCxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudHM6IGVsZW1lbnRzXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc29ydEVsZW1lbnRzKG1lcmdlZCwgY29udGV4dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfcmVwbGFjZUhvc3RzXCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3JlcGxhY2VIb3N0cyhlbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBtZXJnZUluRG9tT3JkZXIoe1xuICAgICAgICAgICAgICAgICAgICBsaXN0OiBlbGVtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudHM6IHRoaXMuaW5Eb2N1bWVudCxcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZUVsZW1lbnQ6IHRoaXMuX3Jlc29sdmVIb3N0RWxlbWVudC5iaW5kKHRoaXMpXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIGtleTogXCJfcmVzb2x2ZUhvc3RFbGVtZW50XCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3Jlc29sdmVIb3N0RWxlbWVudChob3N0KSB7XG4gICAgICAgICAgICAgICAgdmFyIG1lcmdlZCA9IG1lcmdlSW5Eb21PcmRlcih7XG4gICAgICAgICAgICAgICAgICAgIGxpc3Q6IHRoaXMuZWxlbWVudHNbaG9zdC5fc29ydGluZ0lkXSxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudHM6IHRoaXMuaW5Ib3N0W2hvc3QuX3NvcnRpbmdJZF0sXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmVFbGVtZW50OiB0aGlzLl9yZXNvbHZlSG9zdEVsZW1lbnQuYmluZCh0aGlzKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciBfdGFiaW5kZXggPSB0YWJpbmRleFZhbHVlKGhvc3QpO1xuICAgICAgICAgICAgICAgIGlmIChfdGFiaW5kZXggIT09IG51bGwgJiYgX3RhYmluZGV4ID4gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhvc3RcbiAgICAgICAgICAgICAgICAgICAgXS5jb25jYXQobWVyZ2VkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1lcmdlZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAga2V5OiBcIl9jbGVhbnVwXCIsXG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX2NsZWFudXAo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lZ2lzdGVyQmluZGluZyk7XG4gICAgfSk7XG4gICAgdmFyIGhhbmRsZUtleURvd24gPSBmdW5jdGlvbiBoYW5kbGVLZXlEb3duKGV2ZW50KSB7XG4gICAgICAgIGlmIChldmVudC5kZWZhdWx0UHJldmVudGVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGZpbHRlci5sZW5ndGgpIHtcbiAgICAgICAgICAgIC8vIGlnbm9yZSBlbGVtZW50cyB3aXRoaW4gdGhlIGV4ZW1wdGVkIHN1Yi10cmVlc1xuICAgICAgICAgICAgdmFyIGlzUGFyZW50T2ZFbGVtZW50ID0gZ2V0UGFyZW50Q29tcGFyYXRvcih7XG4gICAgICAgICAgICAgICAgZWxlbWVudDogZXZlbnQudGFyZ2V0LFxuICAgICAgICAgICAgICAgIGluY2x1ZGVTZWxmOiB0cnVlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChmaWx0ZXIuc29tZShpc1BhcmVudE9mRWxlbWVudCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGtleSA9IGV2ZW50LmtleUNvZGUgfHwgZXZlbnQud2hpY2g7XG4gICAgICAgIGlmICghYmluZGluZ3Nba2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGJpbmRpbmdzW2tleV0uZm9yRWFjaChmdW5jdGlvbihfZXZlbnQpIHtcbiAgICAgICAgICAgIGlmICghX2V2ZW50Lm1hdGNoTW9kaWZpZXJzKGV2ZW50KSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF9ldmVudC5jYWxsYmFjay5jYWxsKGNvbnRleHQsIGV2ZW50LCBkaXNlbmdhZ2UpO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIGNvbnRleHQuYWRkRXZlbnRMaX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0YWJcIjogZnVuY3Rpb24gYWx0U2hpZnRUYWIoZXZlbnQpIHtcbiAgICAgICAgICAgIC8vIHdlJ3JlIGNvbXBsZXRlbHkgdGFraW5nIG92ZXIgdGhlIFRhYiBrZXkgaGFuZGxpbmdcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB2YXIgc2VxdWVuY2UgPSBxdWVyeVRhYnNlcXVlbmNlKHtcbiAgICAgICAgICAgICAgICBjb250ZXh0OiBjb250ZXh0XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBiYWNrd2FyZCA9IGV2ZW50LnNoaWZ0S2V5O1xuICAgICAgICAgICAgdmFyIGZpcnN0ID0gc2VxdWVuY2VbMF07XG4gICAgICAgICAgICB2YXIgbGFzdCA9IHNlcXVlbmNlW3NlcXVlbmNlLmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgLy8gd3JhcCBhcm91bmQgZmlyc3QgdG8gbGFzdCwgbGFzdCB0byBmaXJzdFxuICAgICAgICAgICAgdmFyIHNvdXJjZSA9IGJhY2t3YXJkID8gZmlyc3QgOiBsYXN0O1xuICAgICAgICAgICAgdmFyIHRhcmdldCA9IGJhY2t3YXJkID8gbGFzdCA6IGZpcnN0O1xuICAgICAgICAgICAgaWYgKGlzQWN0aXZlRWxlbWVudChzb3VyY2UpKSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0LmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gZmluZCBjdXJyZW50IHBvc2l0aW9uIGluIHRhYnNlcXVlbmNlXG4gICAgICAgICAgICB2YXIgY3VycmVudEluZGV4ID0gdm9pZCAwO1xuICAgICAgICAgICAgdmFyIGZvdW5kID0gc2VxdWVuY2Uuc29tZShmdW5jdGlvbihlbGVtZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICAgIGlmICghaXNBY3RpdmVFbGVtZW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HJsS2V5IiwibWV0YUtleSIsInNoaWZ0S2V5IiwicmVzb2x2ZU1vZGlmaWVycyIsIm1vZGlmaWVycyIsImV4cGVjdGVkIiwidG9rZW4iLCJwcm9wZXJ0eU5hbWUiLCJyZXNvbHZlS2V5IiwibWF0Y2hNb2RpZmllcnMiLCJldmVudCIsInByb3AiLCJrZXlCaW5kaW5nIiwidGV4dCIsIl90ZXh0IiwidG9rZW5zIiwiX21vZGlmaWVycyIsIl9rZXlDb2RlcyIsImtleUNvZGVzIiwiZ2V0UGFyZW50Q29tcGFyYXRvciIsImluY2x1ZGVTZWxmIiwiaXNDaGlsZE9mIiwiRE9DVU1FTlRfUE9TSVRJT05fQ09OVEFJTkVEX0JZIiwiaXNQYXJlbnRPZiIsIndoZW5LZXkiLCJiaW5kaW5ncyIsIm1hcEtleXMiLCJyZWdpc3RlckJpbmRpbmciLCJhZGRDYWxsYmFjayIsImhhbmRsZUtleURvd24iLCJkZWZhdWx0UHJldmVudGVkIiwiaXNQYXJlbnRPZkVsZW1lbnQiLCJrZXlDb2RlIiwid2hpY2giLCJfZXZlbnQiLCJkaXNlbmdhZ2UiLCJhZGRFdmVudExpc3RlbmVyIiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsInBhcmFtIiwiYWx0U2hpZnRUYWIiLCJwcmV2ZW50RGVmYXVsdCIsInNlcXVlbmNlIiwiYmFja3dhcmQiLCJmaXJzdCIsImxhc3QiLCJzb3VyY2UiLCJjdXJyZW50SW5kZXgiLCJmb3VuZCIsImluZGV4IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js ***! \**********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-dialog-overlay] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n overflow: auto;\\n z-index: 9000;\\n\\n display: flex;\\n align-content: center;\\n align-items: center;\\n flex-direction: column;\\n padding: 10vh 15px 0;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n padding: 15px 15px 0;\\n }\\n }\\n\\n [data-nextjs-dialog-backdrop] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n background-color: rgba(17, 17, 17, 0.2);\\n pointer-events: all;\\n z-index: -1;\\n }\\n\\n [data-nextjs-dialog-backdrop-fixed] {\\n cursor: not-allowed;\\n -webkit-backdrop-filter: blur(8px);\\n backdrop-filter: blur(8px);\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJzdHlsZXMiLCJfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2UiLCJyZXF1aXJlIiwiX25vb3B0ZW1wbGF0ZSIsIl90ZW1wbGF0ZU9iamVjdCIsImRhdGEiLCJfIiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js": /*!********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js ***! \********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"ShadowPortal\", ({\n enumerable: true,\n get: function() {\n return ShadowPortal;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _reactdom = __webpack_require__(/*! react-dom */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/index.js\");\nfunction ShadowPortal(param) {\n _s();\n let { children } = param;\n let portalNode = _react.useRef(null);\n let shadowNode = _react.useRef(null);\n let [, forceUpdate] = _react.useState();\n _react.useLayoutEffect(()=>{\n const ownerDocument = document;\n portalNode.current = ownerDocument.createElement(\"nextjs-portal\");\n shadowNode.current = portalNode.current.attachShadow({\n mode: \"open\"\n });\n ownerDocument.body.appendChild(portalNode.current);\n forceUpdate({});\n return ()=>{\n if (portalNode.current && portalNode.current.ownerDocument) {\n portalNode.current.ownerDocument.body.removeChild(portalNode.current);\n }\n };\n }, []);\n return shadowNode.current ? /*#__PURE__*/ (0, _reactdom.createPortal)(children, shadowNode.current) : null;\n}\n_s(ShadowPortal, \"P7YL0rn/sjH62F7+OsEXN5GMw3U=\");\n_c = ShadowPortal;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=ShadowPortal.js.map\nvar _c;\n$RefreshReg$(_c, \"ShadowPortal\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1NoYWRvd1BvcnRhbC5qcyIsIm1hcHBpbmdzIjoiQUF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0ZG9tIiwicGFyYW0iLCJjaGlsZHJlbiIsInBvcnRhbE5vZGUiLCJ1c2VSZWYiLCJzaGFkb3dOb2RlIiwiZm9yY2VVcGRhdGUiLCJ1c2VTdGF0ZSIsInVzZUxheW91dEVmZmVjdCIsIm93bmVyRG9jdW1lbnQiLCJkb2N1bWVudCIsImN1cnJlbnQiLCJjcmVhdGVFbGVtZW50IiwiYXR0YWNoU2hhZG93IiwibW9kZSIsImJvZHkiLCJhcHBlbmRDaGlsZCIsInJlbW92ZUNoaWxkIiwiY3JlYXRlUG9ydGFsIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js": /*!***************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js ***! \***************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"EditorLink\", ({\n enumerable: true,\n get: function() {\n return EditorLink;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _useopenineditor = __webpack_require__(/*! ../../helpers/use-open-in-editor */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js\");\nfunction EditorLink(param) {\n let { file, isSourceFile, location } = param;\n var _location_line, _location_column;\n const open = (0, _useopenineditor.useOpenInEditor)({\n file,\n lineNumber: (_location_line = location == null ? void 0 : location.line) != null ? _location_line : 1,\n column: (_location_column = location == null ? void 0 : location.column) != null ? _location_column : 0\n });\n return /*#__PURE__*/ _react.default.createElement(\"div\", {\n \"data-with-open-in-editor-link\": true,\n \"data-with-open-in-editor-link-source-file\": isSourceFile ? true : undefined,\n \"data-with-open-in-editor-link-import-trace\": isSourceFile ? undefined : true,\n tabIndex: 10,\n role: \"link\",\n onClick: open,\n title: \"Click to open in your editor\"\n }, file, location ? \" (\" + location.line + \":\" + location.column + \")\" : null, /*#__PURE__*/ _react.default.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n }), /*#__PURE__*/ _react.default.createElement(\"polyline\", {\n points: \"15 3 21 3 21 9\"\n }), /*#__PURE__*/ _react.default.createElement(\"line\", {\n x1: \"10\",\n y1: \"14\",\n x2: \"21\",\n y2: \"3\"\n })));\n}\n_c = EditorLink;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=EditorLink.js.map\nvar _c;\n$RefreshReg$(_c, \"EditorLink\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1Rlcm1pbmFsL0VkaXRvckxpbmsuanMiLCJtYXB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mRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9RWRpdG9yTGluay5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiRWRpdG9yTGluayIsIl9pbnRlcm9wX3JlcXVpcmVfZGVmYXVsdCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfIiwiX3VzZW9wZW5pbmVkaXRvciIsInBhcmFtIiwiZmlsZSIsImlzU291cmNlRmlsZSIsImxvY2F0aW9uIiwiX2xvY2F0aW9uX2xpbmUiLCJfbG9jYXRpb25fY29sdW1uIiwib3BlbiIsInVzZU9wZW5JbkVkaXRvciIsImxpbmVOdW1iZXIiLCJsaW5lIiwiY29sdW1uIiwiZGVmYXVsdCIsImNyZWF0ZUVsZW1lbnQiLCJ1bmRlZmluZWQiLCJ0YWJJbmRleCIsInJvbGUiLCJvbkNsaWNrIiwidGl0bGUiLCJ4bWxucyIsInZpZXdCb3giLCJmaWxsIiwic3Ryb2tlIiwic3Ryb2tlV2lkdGgiLCJzdHJva2VMaW5lY2FwIiwic3Ryb2tlTGluZWpvaW4iLCJkIiwicG9pbnRzIiwieDEiLCJ5MSIsIngyIiwieTIiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js": /*!*************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js ***! \*************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Terminal\", ({\n enumerable: true,\n get: function() {\n return Terminal;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _anser = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/anser */ \"(app-client)/./node_modules/next/dist/compiled/anser/index.js\"));\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _hotlinkedtext = __webpack_require__(/*! ../hot-linked-text */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js\");\nconst _EditorLink = __webpack_require__(/*! ./EditorLink */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js\");\nfunction getFile(lines) {\n const contentFileName = lines.shift();\n if (!contentFileName) return null;\n const [fileName, line, column] = contentFileName.split(\":\");\n const parsedLine = Number(line);\n const parsedColumn = Number(column);\n const hasLocation = !Number.isNaN(parsedLine) && !Number.isNaN(parsedColumn);\n return {\n fileName: hasLocation ? fileName : contentFileName,\n location: hasLocation ? {\n line: parsedLine,\n column: parsedColumn\n } : undefined\n };\n}\nfunction getImportTraceFiles(lines) {\n if (lines.some((line)=>/ReactServerComponentsError:/.test(line)) || lines.some((line)=>/Import trace for requested module:/.test(line))) {\n // Grab the lines at the end containing the files\n const files = [];\n while(/.+\\..+/.test(lines[lines.length - 1]) && !lines[lines.length - 1].includes(\":\")){\n const file = lines.pop().trim();\n files.unshift(file);\n }\n return files;\n }\n return [];\n}\nfunction getEditorLinks(content) {\n const lines = content.split(\"\\n\");\n const file = getFile(lines);\n const importTraceFiles = getImportTraceFiles(lines);\n return {\n file,\n source: lines.join(\"\\n\"),\n importTraceFiles\n };\n}\nconst Terminal = function Terminal(param) {\n _s();\n let { content } = param;\n const { file, source, importTraceFiles } = _react.useMemo(()=>getEditorLinks(content), [\n content\n ]);\n const decoded = _react.useMemo(()=>{\n return _anser.default.ansiToJson(source, {\n json: true,\n use_classes: true,\n remove_empty: true\n });\n }, [\n source\n ]);\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-terminal\": true\n }, file && /*#__PURE__*/ _react.createElement(_EditorLink.EditorLink, {\n isSourceFile: true,\n key: file.fileName,\n file: file.fileName,\n location: file.location\n }), /*#__PURE__*/ _react.createElement(\"pre\", null, decoded.map((entry, index)=>/*#__PURE__*/ _react.createElement(\"span\", {\n key: \"terminal-entry-\" + index,\n style: {\n color: entry.fg ? \"var(--color-\" + entry.fg + \")\" : undefined,\n ...entry.decoration === \"bold\" ? {\n fontWeight: 800\n } : entry.decoration === \"italic\" ? {\n fontStyle: \"italic\"\n } : undefined\n }\n }, /*#__PURE__*/ _react.createElement(_hotlinkedtext.HotlinkedText, {\n text: entry.content\n }))), importTraceFiles.map((importTraceFile)=>/*#__PURE__*/ _react.createElement(_EditorLink.EditorLink, {\n isSourceFile: false,\n key: importTraceFile,\n file: importTraceFile\n }))));\n};\n_s(Terminal, \"6rWLT1jdsZmQ5Baqns65UNkRr5Q=\");\n_c = Terminal;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Terminal.js.map\nvar _c;\n$RefreshReg$(_c, \"Terminal\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZ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vbHVtbiIsInNwbGl0IiwicGFyc2VkTGluZSIsIk51bWJlciIsInBhcnNlZENvbHVtbiIsImhhc0xvY2F0aW9uIiwiaXNOYU4iLCJsb2NhdGlvbiIsInVuZGVmaW5lZCIsImdldEltcG9ydFRyYWNlRmlsZXMiLCJzb21lIiwidGVzdCIsImZpbGVzIiwibGVuZ3RoIiwiaW5jbHVkZXMiLCJmaWxlIiwicG9wIiwidHJpbSIsInVuc2hpZnQiLCJnZXRFZGl0b3JMaW5rcyIsImNvbnRlbnQiLCJpbXBvcnRUcmFjZUZpbGVzIiwic291cmNlIiwiam9pbiIsInBhcmFtIiwidXNlTWVtbyIsImRlY29kZWQiLCJkZWZhdWx0IiwiYW5zaVRvSnNvbiIsImpzb24iLCJ1c2VfY2xhc3NlcyIsInJlbW92ZV9lbXB0eSIsImNyZWF0ZUVsZW1lbnQiLCJFZGl0b3JMaW5rIiwiaXNTb3VyY2VGaWxlIiwia2V5IiwibWFwIiwiZW50cnkiLCJpbmRleCIsInN0eWxlIiwiY29sb3IiLCJmZyIsImRlY29yYXRpb24iLCJmb250V2VpZ2h0IiwiZm9udFN0eWxlIiwiSG90bGlua2VkVGV4dCIsInRleHQiLCJpbXBvcnRUcmFjZUZpbGUiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js ***! \**********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Terminal\", ({\n enumerable: true,\n get: function() {\n return _Terminal.Terminal;\n }\n}));\nconst _Terminal = __webpack_require__(/*! ./Terminal */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1Rlcm1pbmFsL2luZGV4LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw0Q0FBMkM7SUFDdkNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DLFVBQVVDLFFBQVE7SUFDN0I7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNRCxZQUFZRSxtQkFBT0EsQ0FBQyxzSUFBWTtBQUV0QyxJQUFJLENBQUMsT0FBT04sUUFBUU8sT0FBTyxLQUFLLGNBQWUsT0FBT1AsUUFBUU8sT0FBTyxLQUFLLFlBQVlQLFFBQVFPLE9BQU8sS0FBSyxJQUFJLEtBQU0sT0FBT1AsUUFBUU8sT0FBTyxDQUFDQyxVQUFVLEtBQUssYUFBYTtJQUNyS1YsT0FBT0MsY0FBYyxDQUFDQyxRQUFRTyxPQUFPLEVBQUUsY0FBYztRQUFFTixPQUFPO0lBQUs7SUFDbkVILE9BQU9XLE1BQU0sQ0FBQ1QsUUFBUU8sT0FBTyxFQUFFUDtJQUMvQlUsT0FBT1YsT0FBTyxHQUFHQSxRQUFRTyxPQUFPO0FBQ2xDLEVBRUEsaUNBQW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T2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiX1Rlcm1pbmFsIiwiVGVybWluYWwiLCJyZXF1aXJlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js": /*!***********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js ***! \***********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-terminal] {\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-terminal]::selection,\\n [data-nextjs-terminal] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-terminal] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n [data-nextjs-terminal] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n\\n [data-nextjs-terminal] pre {\\n white-space: pre-wrap;\\n word-break: break-word;\\n }\\n\\n [data-with-open-in-editor-link] svg {\\n width: auto;\\n height: var(--size-font-small);\\n margin-left: var(--size-gap);\\n }\\n [data-with-open-in-editor-link] {\\n cursor: pointer;\\n }\\n [data-with-open-in-editor-link]:hover {\\n text-decoration: underline dotted;\\n }\\n [data-with-open-in-editor-link-source-file] {\\n border-bottom: 1px solid var(--color-ansi-bright-black);\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n }\\n [data-with-open-in-editor-link-import-trace] {\\n margin-left: var(--size-gap-double);\\n }\\n [data-nextjs-terminal] a {\\n color: inherit;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1Rlcm1pbmFsL3N0eWxlcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsMENBQXlDO0lBQ3JDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsaUNBQWlDQyxtQkFBT0EsQ0FBQyxxSUFBK0M7QUFDOUYsTUFBTUMsZ0JBQWdCRCxtQkFBT0EsQ0FBQyxnSkFBNkI7QUFDM0QsU0FBU0U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XJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js ***! \*******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Toast\", ({\n enumerable: true,\n get: function() {\n return Toast;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst Toast = function Toast(param) {\n let { onClick, children, className } = param;\n return /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-toast\": true,\n onClick: onClick,\n className: className\n }, /*#__PURE__*/ _react.createElement(\"div\", {\n \"data-nextjs-toast-wrapper\": true\n }, children));\n};\n_c = Toast;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Toast.js.map\nvar _c;\n$RefreshReg$(_c, \"Toast\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1RvYXN0L1RvYXN0LmpzIiwibWF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oXCJkaXZcIiwge1xuICAgICAgICBcImRhdGEtbmV4dGpzLXRvYXN0LXdyYXBwZXJcIjogdHJ1ZVxuICAgIH0sIGNoaWxkcmVuKSk7XG59O1xuXG5pZiAoKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdmdW5jdGlvbicgfHwgKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdvYmplY3QnICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1Ub2FzdC5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiVG9hc3QiLCJfaW50ZXJvcF9yZXF1aXJlX3dpbGRjYXJkIiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJwYXJhbSIsIm9uQ2xpY2siLCJjaGlsZHJlbiIsImNsYXNzTmFtZSIsImNyZWF0ZUVsZW1lbnQiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js ***! \*******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n styles: function() {\n return _styles.styles;\n },\n Toast: function() {\n return _Toast.Toast;\n }\n});\nconst _styles = __webpack_require__(/*! ./styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js\");\nconst _Toast = __webpack_require__(/*! ./Toast */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1RvYXN0L2luZGV4LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBR047QUFDQSxTQUFTRyxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVCxPQUFPQyxjQUFjLENBQUNPLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUF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2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiX3N0eWxlcyIsIl9Ub2FzdCIsInJlcXVpcmUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js": /*!********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js ***! \********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n [data-nextjs-toast] {\\n position: fixed;\\n bottom: var(--size-gap-double);\\n left: var(--size-gap-double);\\n max-width: 420px;\\n z-index: 9000;\\n }\\n\\n @media (max-width: 440px) {\\n [data-nextjs-toast] {\\n max-width: 90vw;\\n left: 5vw;\\n }\\n }\\n\\n [data-nextjs-toast-wrapper] {\\n padding: 16px;\\n border-radius: var(--size-gap-half);\\n font-weight: 500;\\n color: var(--color-ansi-bright-white);\\n background-color: var(--color-ansi-red);\\n box-shadow: 0px var(--size-gap-double) var(--size-gap-quad)\\n rgba(0, 0, 0, 0.25);\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1RvYXN0L3N0eWxlcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsMENBQXlDO0lBQ3JDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsaUNBQWlDQyxtQkFBT0EsQ0FBQyxxSUFBK0M7QUFDOUYsTUFBTUMsZ0JBQWdCRCxtQkFBT0EsQ0FBQyxnSkFBNkI7QUFDM0QsU0FBU0U7SUFDTCxNQUFNQyxPQUFPSiwrQkFBK0JLLENBQUMsQ0FBQztRQUMxQztLQUNIO0lBQ0RGLGtCQUFrQjtRQUNkLE9BQU9DO0lBQ1g7SUFDQSxPQUFPQTtBQUNYO0FBQ0EsTUFBTUwsU0FBUyxDQUFDLEdBQUdHLGNBQWNJLElBQUksRUFBRUg7QUFFdkMsSUFBSSxDQUFDLE9BQU9SLFFBQVFZLE9BQU8sS0FBSyxjQUFlLE9BQU9aLFFBQVFZLE9BQU8sS0FBSyxZQUFZWixRQUFRWSxPQUFPLEtBQUssSUFBSSxLQUFNLE9BQU9aLFFBQVFZLE9BQU8sQ0FBQ0MsVUFBVSxLQUFLLGFBQWE7SUFDcktmLE9BQ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wb3J0cy5kZWZhdWx0ID09PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJzdHlsZXMiLCJfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2UiLCJyZXF1aXJlIiwiX25vb3B0ZW1wbGF0ZSIsIl90ZW1wbGF0ZU9iamVjdCIsImRhdGEiLCJfIiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js": /*!*************************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js ***! \*************************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"VersionStalenessInfo\", ({\n enumerable: true,\n get: function() {\n return VersionStalenessInfo;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nfunction VersionStalenessInfo(props) {\n if (!props) return null;\n const { staleness, installed, expected } = props;\n let text = \"\";\n let title = \"\";\n let indicatorClass = \"\";\n switch(staleness){\n case \"fresh\":\n text = \"Next.js is up to date\";\n title = \"Latest available version is detected (\" + installed + \").\";\n indicatorClass = \"fresh\";\n break;\n case \"stale-patch\":\n case \"stale-minor\":\n text = \"Next.js (\" + installed + \") out of date\";\n title = \"There is a newer version (\" + expected + \") available, upgrade recommended! \";\n indicatorClass = \"stale\";\n break;\n case \"stale-major\":\n {\n text = \"Next.js (\" + installed + \") is outdated\";\n title = \"An outdated version detected (latest is \" + expected + \"), upgrade is highly recommended!\";\n indicatorClass = \"outdated\";\n break;\n }\n case \"stale-prerelease\":\n {\n text = \"Next.js (\" + installed + \") is outdated\";\n title = \"There is a newer canary version (\" + expected + \") available, please upgrade! \";\n indicatorClass = \"stale\";\n break;\n }\n case \"newer-than-npm\":\n case \"unknown\":\n break;\n default:\n break;\n }\n if (!text) return null;\n return /*#__PURE__*/ _react.default.createElement(\"small\", {\n className: \"nextjs-container-build-error-version-status\"\n }, /*#__PURE__*/ _react.default.createElement(\"span\", {\n className: indicatorClass\n }), /*#__PURE__*/ _react.default.createElement(\"small\", {\n className: \"nextjs-container-build-error-version-status\",\n title: title\n }, text), \" \", staleness === \"fresh\" || staleness === \"unknown\" ? null : /*#__PURE__*/ _react.default.createElement(\"a\", {\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n href: \"https://nextjs.org/docs/messages/version-staleness\"\n }, \"(learn more)\"));\n}\n_c = VersionStalenessInfo;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=VersionStalenessInfo.js.map\nvar _c;\n$RefreshReg$(_c, \"VersionStalenessInfo\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1ZlcnNpb25TdGFsZW5lc3NJbmZvL1ZlcnNpb25TdGFsZW5lc3NJbmZvLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCx3REFBdUQ7SUFDbkRJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQywyQkFBMkJDLG1CQUFPQSxDQUFDLHlIQUF5QztBQUNsRixNQUFNQyxTQUFTLFdBQVcsR0FBR0YseUJBQXlCRyxDQUFDLENBQUNGLG1CQUFPQSxDQUFDLDRFQUFPO0FBQ3ZFLFNBQVNGLHFCQUFxQkssS0FBSztJQUMvQixJQUFJLENBQUNBLE9BQU8sT0FBTztJQUNuQixNQUFNLEVBQUVDLFNBQVMsRUFBR0MsU0FBUyxFQUFHQyxRQUFRLEVBQUcsR0FBR0g7SUFDOUMsSUFBSUksT0FBTztJQUNYLElBQUlDLFFBQVE7SUFDWixJQUFJQyxpQkFBaUI7SUFDckIsT0FBT0w7UUFDSCxLQUFLO1lBQ0RHLE9BQU87WUFDUEMsUUFBUSwyQ0FBMkNILFlBQVk7WUFDL0RJLGlCQUFpQjtZQUNqQjtRQUNKLEtBQUs7UUFDTCxLQUFLO1l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7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVZlcnNpb25TdGFsZW5lc3NJbmZvLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJWZXJzaW9uU3RhbGVuZXNzSW5mbyIsIl9pbnRlcm9wX3JlcXVpcmVfZGVmYXVsdCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfIiwicHJvcHMiLCJzdGFsZW5lc3MiLCJpbnN0YWxsZWQiLCJleHBlY3RlZCIsInRleHQiLCJ0aXRsZSIsImluZGljYXRvckNsYXNzIiwiZGVmYXVsdCIsImNyZWF0ZUVsZW1lbnQiLCJjbGFzc05hbWUiLCJ0YXJnZXQiLCJyZWwiLCJocmVmIiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js": /*!**********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js ***! \**********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n styles: function() {\n return _styles.styles;\n },\n VersionStalenessInfo: function() {\n return _VersionStalenessInfo.VersionStalenessInfo;\n }\n});\nconst _styles = __webpack_require__(/*! ./styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js\");\nconst _VersionStalenessInfo = __webpack_require__(/*! ./VersionStalenessInfo */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1ZlcnNpb25TdGFsZW5lc3NJbmZvL2luZGV4LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBR047QUFDQSxTQUFTRyxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVCxPQUFPQyxjQUFjLENBQUNPLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUUwsU0FBUztJQUNiRyxRQUFRO1FBQ0osT0FBT1EsUUFBUVIsTUFBTTtJQUN6QjtJQUNBQyxzQkFBc0I7UUFDbEIsT0FBT1Esc0JBQXNCUixvQkFBb0I7SUFDckQ7QUFDSjtBQUNBLE1BQU1PLFVBQVVFLG1CQUFPQSxDQUFDLDhJQUFV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J0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9zdHlsZXMiLCJfVmVyc2lvblN0YWxlbmVzc0luZm8iLCJyZXF1aXJlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js": /*!***********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js ***! \***********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"styles\", ({\n enumerable: true,\n get: function() {\n return styles;\n }\n}));\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n .nextjs-container-build-error-version-status {\\n flex: 1;\\n text-align: right;\\n }\\n .nextjs-container-build-error-version-status small {\\n margin-left: var(--size-gap);\\n font-size: var(--size-font-small);\\n }\\n .nextjs-container-build-error-version-status a {\\n font-size: var(--size-font-small);\\n }\\n .nextjs-container-build-error-version-status span {\\n display: inline-block;\\n width: 10px;\\n height: 10px;\\n border-radius: 5px;\\n background: var(--color-ansi-bright-black);\\n }\\n .nextjs-container-build-error-version-status span.fresh {\\n background: var(--color-ansi-green);\\n }\\n .nextjs-container-build-error-version-status span.stale {\\n background: var(--color-ansi-yellow);\\n }\\n .nextjs-container-build-error-version-status span.outdated {\\n background: var(--color-ansi-red);\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=styles.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb21wb25lbnRzL1ZlcnNpb25TdGFsZW5lc3NJbmZvL3N0eWxlcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsMENBQXlDO0lBQ3JDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsaUNBQWlDQyxtQkFBT0EsQ0FBQyxxSUFBK0M7QUFDOUYsTUFBTUMsZ0JBQWdCRCxtQkFBT0EsQ0FBQyxnSkFBNkI7QUFDM0QsU0FBU0U7SUFDTCxNQUFNQyxPQUFPSiwrQkFBK0JLLENBQUMsQ0FBQztRQUMxQztLQUNIO0lBQ0RGLGtCQUFrQjtRQUNkLE9BQU9DO0lBQ1g7SUFDQSxPQUFPQTtBQUNYO0FBQ0EsTUFBTUwsU0FBUyxDQUFDLEdBQUdHLGNBQWNJLElBQUksRUFBRUg7QUFFdkMsSUFBSSxDQUFDLE9BQU9SLFFBQVFZLE9BQU8sS0FBSyxjQUFlLE9BQU9aLFFBQVFZLE9BQU8sS0FBSyx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UiLCJfdGVtcGxhdGVPYmplY3QiLCJkYXRhIiwiXyIsIm5vb3AiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.js": /*!*************************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.js ***! \*************************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// Returns true if the given character is a whitespace character, false otherwise.\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getWordsAndWhitespaces\", ({\n enumerable: true,\n get: function() {\n return getWordsAndWhitespaces;\n }\n}));\nfunction isWhitespace(char) {\n return char === \" \" || char === \"\\n\" || char === \"\t\" || char === \"\\r\";\n}\nfunction getWordsAndWhitespaces(text) {\n const wordsAndWhitespaces = [];\n let current = \"\";\n let currentIsWhitespace = false;\n for (const char of text){\n if (current.length === 0) {\n current += char;\n currentIsWhitespace = isWhitespace(char);\n continue;\n }\n const nextIsWhitespace = isWhitespace(char);\n if (currentIsWhitespace === nextIsWhitespace) {\n current += char;\n } else {\n wordsAndWhitespaces.push(current);\n current = char;\n currentIsWhitespace = nextIsWhitespace;\n }\n }\n if (current.length > 0) {\n wordsAndWhitespaces.push(current);\n }\n return wordsAndWhitespaces;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=get-words-and-whitespaces.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=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7XG4gICAgfVxuICAgIHJldHVybiB3b3Jkc0FuZFdoaXRlc3BhY2VzO1xufVxuXG5pZiAoKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdmdW5jdGlvbicgfHwgKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdvYmplY3QnICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1nZXQtd29yZHMtYW5kLXdoaXRlc3BhY2VzLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJnZXRXb3Jkc0FuZFdoaXRlc3BhY2VzIiwiaXNXaGl0ZXNwYWNlIiwiY2hhciIsInRleHQiLCJ3b3Jkc0FuZFdoaXRlc3BhY2VzIiwiY3VycmVudCIsImN1cnJlbnRJc1doaXRlc3BhY2UiLCJsZW5ndGgiLCJuZXh0SXNXaGl0ZXNwYWNlIiwicHVzaCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js": /*!*****************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js ***! \*****************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"HotlinkedText\", ({\n enumerable: true,\n get: function() {\n return HotlinkedText;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _getwordsandwhitespaces = __webpack_require__(/*! ./get-words-and-whitespaces */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/get-words-and-whitespaces.js\");\nconst linkRegex = /https?:\\/\\/[^\\s/$.?#].[^\\s\"]*/i;\nconst HotlinkedText = function HotlinkedText(props) {\n const { text } = props;\n const wordsAndWhitespaces = (0, _getwordsandwhitespaces.getWordsAndWhitespaces)(text);\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, linkRegex.test(text) ? wordsAndWhitespaces.map((word, index)=>{\n if (linkRegex.test(word)) {\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, {\n key: \"link-\" + index\n }, /*#__PURE__*/ _react.default.createElement(\"a\", {\n href: word\n }, word));\n }\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, {\n key: \"text-\" + index\n }, word);\n }) : text);\n};\n_c = HotlinkedText;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\nvar _c;\n$RefreshReg$(_c, \"HotlinkedText\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module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wIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsIkhvdGxpbmtlZFRleHQiLCJfaW50ZXJvcF9yZXF1aXJlX2RlZmF1bHQiLCJyZXF1aXJlIiwiX3JlYWN0IiwiXyIsIl9nZXR3b3Jkc2FuZHdoaXRlc3BhY2VzIiwibGlua1JlZ2V4IiwicHJvcHMiLCJ0ZXh0Iiwid29yZHNBbmRXaGl0ZXNwYWNlcyIsImdldFdvcmRzQW5kV2hpdGVzcGFjZXMiLCJkZWZhdWx0IiwiY3JlYXRlRWxlbWVudCIsIkZyYWdtZW50IiwidGVzdCIsIm1hcCIsIndvcmQiLCJpbmRleCIsImtleSIsImhyZWYiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js ***! \*****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n BuildError: function() {\n return BuildError;\n },\n styles: function() {\n return styles;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _Dialog = __webpack_require__(/*! ../components/Dialog */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js\");\nconst _Overlay = __webpack_require__(/*! ../components/Overlay */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js\");\nconst _Terminal = __webpack_require__(/*! ../components/Terminal */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js\");\nconst _VersionStalenessInfo = __webpack_require__(/*! ../components/VersionStalenessInfo */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js\");\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n .nextjs-container-build-error-header {\\n display: flex;\\n align-items: center;\\n }\\n .nextjs-container-build-error-header > h4 {\\n line-height: 1.5;\\n margin: 0;\\n padding: 0;\\n }\\n\\n .nextjs-container-build-error-body footer {\\n margin-top: var(--size-gap);\\n }\\n .nextjs-container-build-error-body footer p {\\n margin: 0;\\n }\\n\\n .nextjs-container-build-error-body small {\\n color: #757575;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst BuildError = function BuildError(param) {\n _s();\n let { message, versionInfo } = param;\n const noop = _react.useCallback(()=>{}, []);\n return /*#__PURE__*/ _react.createElement(_Overlay.Overlay, {\n fixed: true\n }, /*#__PURE__*/ _react.createElement(_Dialog.Dialog, {\n type: \"error\",\n \"aria-labelledby\": \"nextjs__container_build_error_label\",\n \"aria-describedby\": \"nextjs__container_build_error_desc\",\n onClose: noop\n }, /*#__PURE__*/ _react.createElement(_Dialog.DialogContent, null, /*#__PURE__*/ _react.createElement(_Dialog.DialogHeader, {\n className: \"nextjs-container-build-error-header\"\n }, /*#__PURE__*/ _react.createElement(\"h4\", {\n id: \"nextjs__container_build_error_label\"\n }, \"Failed to compile\"), versionInfo ? /*#__PURE__*/ _react.createElement(_VersionStalenessInfo.VersionStalenessInfo, versionInfo) : null), /*#__PURE__*/ _react.createElement(_Dialog.DialogBody, {\n className: \"nextjs-container-build-error-body\"\n }, /*#__PURE__*/ _react.createElement(_Terminal.Terminal, {\n content: message\n }), /*#__PURE__*/ _react.createElement(\"footer\", null, /*#__PURE__*/ _react.createElement(\"p\", {\n id: \"nextjs__container_build_error_desc\"\n }, /*#__PURE__*/ _react.createElement(\"small\", null, \"This error occurred during the build process and can only be dismissed by fixing the error.\")))))));\n};\n_s(BuildError, \"hHp3im7kVRcdOeKmK0+3cSEjzLI=\");\n_c = BuildError;\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=BuildError.js.map\nvar _c;\n$RefreshReg$(_c, \"BuildError\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvQnVpbGRFcnJvci5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FHTjtBQUNBLFNBQVNHLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFB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RhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZCIsInJlcXVpcmUiLCJfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2UiLCJfcmVhY3QiLCJfIiwiX0RpYWxvZyIsIl9PdmVybGF5IiwiX1Rlcm1pbmFsIiwiX1ZlcnNpb25TdGFsZW5lc3NJbmZvIiwiX25vb3B0ZW1wbGF0ZSIsIl90ZW1wbGF0ZU9iamVjdCIsImRhdGEiLCJwYXJhbSIsIm1lc3NhZ2UiLCJ2ZXJzaW9uSW5mbyIsIm5vb3AiLCJ1c2VDYWxsYmFjayIsImNyZWF0ZUVsZW1lbnQiLCJPdmVybGF5IiwiZml4ZWQiLCJEaWFsb2ciLCJ0eXBlIiwib25DbG9zZSIsIkRpYWxvZ0NvbnRlbnQiLCJEaWFsb2dIZWFkZXIiLCJjbGFzc05hbWUiLCJpZCIsIlZlcnNpb25TdGFsZW5lc3NJbmZvIiwiRGlhbG9nQm9keSIsIlRlcm1pbmFsIiwiY29udGVudCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js": /*!*************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js ***! \*************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n Errors: function() {\n return Errors;\n },\n styles: function() {\n return styles;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _erroroverlayreducer = __webpack_require__(/*! ../error-overlay-reducer */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js\");\nconst _Dialog = __webpack_require__(/*! ../components/Dialog */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js\");\nconst _LeftRightDialogHeader = __webpack_require__(/*! ../components/LeftRightDialogHeader */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js\");\nconst _Overlay = __webpack_require__(/*! ../components/Overlay */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js\");\nconst _Toast = __webpack_require__(/*! ../components/Toast */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js\");\nconst _getErrorByType = __webpack_require__(/*! ../helpers/getErrorByType */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js\");\nconst _nodeStackFrames = __webpack_require__(/*! ../helpers/nodeStackFrames */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/nodeStackFrames.js\");\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nconst _CloseIcon = __webpack_require__(/*! ../icons/CloseIcon */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js\");\nconst _RuntimeError = __webpack_require__(/*! ./RuntimeError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js\");\nconst _VersionStalenessInfo = __webpack_require__(/*! ../components/VersionStalenessInfo */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js\");\nconst _hotlinkedtext = __webpack_require__(/*! ../components/hot-linked-text */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n .nextjs-container-errors-header > h1 {\\n font-size: var(--size-font-big);\\n line-height: var(--size-font-bigger);\\n font-weight: bold;\\n margin: 0;\\n margin-top: calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n .nextjs-container-errors-header small {\\n font-size: var(--size-font-small);\\n color: var(--color-accents-1);\\n margin-left: var(--size-gap-double);\\n }\\n .nextjs-container-errors-header small > span {\\n font-family: var(--font-stack-monospace);\\n }\\n .nextjs-container-errors-header > p {\\n font-family: var(--font-stack-monospace);\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-big);\\n font-weight: bold;\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n color: var(--color-ansi-red);\\n white-space: pre-wrap;\\n }\\n .nextjs-container-errors-header > div > small {\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n }\\n .nextjs-container-errors-header > p > a {\\n color: var(--color-ansi-red);\\n }\\n\\n .nextjs-container-errors-body > h2:not(:first-child) {\\n margin-top: calc(var(--size-gap-double) + var(--size-gap));\\n }\\n .nextjs-container-errors-body > h2 {\\n margin-bottom: var(--size-gap);\\n font-size: var(--size-font-big);\\n }\\n\\n .nextjs-toast-errors-parent {\\n cursor: pointer;\\n transition: transform 0.2s ease;\\n }\\n .nextjs-toast-errors-parent:hover {\\n transform: scale(1.1);\\n }\\n .nextjs-toast-errors {\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n }\\n .nextjs-toast-errors > svg {\\n margin-right: var(--size-gap);\\n }\\n .nextjs-toast-errors-hide-button {\\n margin-left: var(--size-gap-triple);\\n border: none;\\n background: none;\\n color: var(--color-ansi-bright-white);\\n padding: 0;\\n transition: opacity 0.25s ease;\\n opacity: 0.7;\\n }\\n .nextjs-toast-errors-hide-button:hover {\\n opacity: 1;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction getErrorSignature(ev) {\n const { event } = ev;\n switch(event.type){\n case _erroroverlayreducer.ACTION_UNHANDLED_ERROR:\n case _erroroverlayreducer.ACTION_UNHANDLED_REJECTION:\n {\n return event.reason.name + \"::\" + event.reason.message + \"::\" + event.reason.stack;\n }\n default:\n {}\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = event;\n return \"\";\n}\nconst Errors = function Errors(param) {\n _s();\n let { errors, initialDisplayState, versionInfo } = param;\n const [lookups, setLookups] = _react.useState({});\n const [readyErrors, nextError] = _react.useMemo(()=>{\n let ready = [];\n let next = null;\n // Ensure errors are displayed in the order they occurred in:\n for(let idx = 0; idx < errors.length; ++idx){\n const e = errors[idx];\n const { id } = e;\n if (id in lookups) {\n ready.push(lookups[id]);\n continue;\n }\n // Check for duplicate errors\n if (idx > 0) {\n const prev = errors[idx - 1];\n if (getErrorSignature(prev) === getErrorSignature(e)) {\n continue;\n }\n }\n next = e;\n break;\n }\n return [\n ready,\n next\n ];\n }, [\n errors,\n lookups\n ]);\n const isLoading = _react.useMemo(()=>{\n return readyErrors.length < 1 && Boolean(errors.length);\n }, [\n errors.length,\n readyErrors.length\n ]);\n _react.useEffect(()=>{\n if (nextError == null) {\n return;\n }\n let mounted = true;\n (0, _getErrorByType.getErrorByType)(nextError).then((resolved)=>{\n // We don't care if the desired error changed while we were resolving,\n // thus we're not tracking it using a ref. Once the work has been done,\n // we'll store it.\n if (mounted) {\n setLookups((m)=>({\n ...m,\n [resolved.id]: resolved\n }));\n }\n }, ()=>{\n // TODO: handle this, though an edge case\n });\n return ()=>{\n mounted = false;\n };\n }, [\n nextError\n ]);\n const [displayState, setDisplayState] = _react.useState(initialDisplayState);\n const [activeIdx, setActiveIndex] = _react.useState(0);\n const previous = _react.useCallback((e)=>{\n e == null ? void 0 : e.preventDefault();\n setActiveIndex((v)=>Math.max(0, v - 1));\n }, []);\n const next = _react.useCallback((e)=>{\n e == null ? void 0 : e.preventDefault();\n setActiveIndex((v)=>Math.max(0, Math.min(readyErrors.length - 1, v + 1)));\n }, [\n readyErrors.length\n ]);\n var _readyErrors_activeIdx;\n const activeError = _react.useMemo(()=>(_readyErrors_activeIdx = readyErrors[activeIdx]) != null ? _readyErrors_activeIdx : null, [\n activeIdx,\n readyErrors\n ]);\n // Reset component state when there are no errors to be displayed.\n // This should never happen, but lets handle it.\n _react.useEffect(()=>{\n if (errors.length < 1) {\n setLookups({});\n setDisplayState(\"hidden\");\n setActiveIndex(0);\n }\n }, [\n errors.length\n ]);\n const minimize = _react.useCallback((e)=>{\n e == null ? void 0 : e.preventDefault();\n setDisplayState(\"minimized\");\n }, []);\n const hide = _react.useCallback((e)=>{\n e == null ? void 0 : e.preventDefault();\n setDisplayState(\"hidden\");\n }, []);\n const fullscreen = _react.useCallback((e)=>{\n e == null ? void 0 : e.preventDefault();\n setDisplayState(\"fullscreen\");\n }, []);\n // This component shouldn't be rendered with no errors, but if it is, let's\n // handle it gracefully by rendering nothing.\n if (errors.length < 1 || activeError == null) {\n return null;\n }\n if (isLoading) {\n // TODO: better loading state\n return /*#__PURE__*/ _react.createElement(_Overlay.Overlay, null);\n }\n if (displayState === \"hidden\") {\n return null;\n }\n if (displayState === \"minimized\") {\n return /*#__PURE__*/ _react.createElement(_Toast.Toast, {\n className: \"nextjs-toast-errors-parent\",\n onClick: fullscreen\n }, /*#__PURE__*/ _react.createElement(\"div\", {\n className: \"nextjs-toast-errors\"\n }, /*#__PURE__*/ _react.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/ _react.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"10\"\n }), /*#__PURE__*/ _react.createElement(\"line\", {\n x1: \"12\",\n y1: \"8\",\n x2: \"12\",\n y2: \"12\"\n }), /*#__PURE__*/ _react.createElement(\"line\", {\n x1: \"12\",\n y1: \"16\",\n x2: \"12.01\",\n y2: \"16\"\n })), /*#__PURE__*/ _react.createElement(\"span\", null, readyErrors.length, \" error\", readyErrors.length > 1 ? \"s\" : \"\"), /*#__PURE__*/ _react.createElement(\"button\", {\n \"data-nextjs-toast-errors-hide-button\": true,\n className: \"nextjs-toast-errors-hide-button\",\n type: \"button\",\n onClick: (e)=>{\n e.stopPropagation();\n hide();\n },\n \"aria-label\": \"Hide Errors\"\n }, /*#__PURE__*/ _react.createElement(_CloseIcon.CloseIcon, null))));\n }\n const isServerError = [\n \"server\",\n \"edge-server\"\n ].includes((0, _nodeStackFrames.getErrorSource)(activeError.error) || \"\");\n return /*#__PURE__*/ _react.createElement(_Overlay.Overlay, null, /*#__PURE__*/ _react.createElement(_Dialog.Dialog, {\n type: \"error\",\n \"aria-labelledby\": \"nextjs__container_errors_label\",\n \"aria-describedby\": \"nextjs__container_errors_desc\",\n onClose: isServerError ? undefined : minimize\n }, /*#__PURE__*/ _react.createElement(_Dialog.DialogContent, null, /*#__PURE__*/ _react.createElement(_Dialog.DialogHeader, {\n className: \"nextjs-container-errors-header\"\n }, /*#__PURE__*/ _react.createElement(_LeftRightDialogHeader.LeftRightDialogHeader, {\n previous: activeIdx > 0 ? previous : null,\n next: activeIdx < readyErrors.length - 1 ? next : null,\n close: isServerError ? undefined : minimize\n }, /*#__PURE__*/ _react.createElement(\"small\", null, /*#__PURE__*/ _react.createElement(\"span\", null, activeIdx + 1), \" of\", \" \", /*#__PURE__*/ _react.createElement(\"span\", null, readyErrors.length), \" unhandled error\", readyErrors.length < 2 ? \"\" : \"s\"), versionInfo ? /*#__PURE__*/ _react.createElement(_VersionStalenessInfo.VersionStalenessInfo, versionInfo) : null), /*#__PURE__*/ _react.createElement(\"h1\", {\n id: \"nextjs__container_errors_label\"\n }, isServerError ? \"Server Error\" : \"Unhandled Runtime Error\"), /*#__PURE__*/ _react.createElement(\"p\", {\n id: \"nextjs__container_errors_desc\"\n }, activeError.error.name, \":\", \" \", /*#__PURE__*/ _react.createElement(_hotlinkedtext.HotlinkedText, {\n text: activeError.error.message\n })), isServerError ? /*#__PURE__*/ _react.createElement(\"div\", null, /*#__PURE__*/ _react.createElement(\"small\", null, \"This error happened while generating the page. Any console logs will be displayed in the terminal window.\")) : undefined), /*#__PURE__*/ _react.createElement(_Dialog.DialogBody, {\n className: \"nextjs-container-errors-body\"\n }, /*#__PURE__*/ _react.createElement(_RuntimeError.RuntimeError, {\n key: activeError.id.toString(),\n error: activeError\n })))));\n};\n_s(Errors, \"9RnOMwgyCHKGKiow/VpHS6P2Gq4=\");\n_c = Errors;\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Errors.js.map\nvar _c;\n$RefreshReg$(_c, \"Errors\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvRXJyb3JzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixL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gICAgY29uc3QgeyBpZCAgfSA9IGU7XG4gICAgICAgICAgICBpZiAoaWQgaW4gbG9va3Vwcykge1xuICAgICAgICAgICAgICAgIHJlYWR5LnB1c2gobG9va3Vwc1tpZF0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIGR1cGxpY2F0ZSBlcnJvcnNcbiAgICAgICAgICAgIGlmIChpZHggPiAwKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcHJldiA9IGVycm9yc1tpZHggLSAxXTtcbiAgICAgICAgICAgICAgICBpZiAoZ2V0RXJyb3JTaWduYXR1cmUocHJldikgPT09IGdldEVycm9yU2lnbmF0dXJlKGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG5leHQgPSBlO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgIHJlYWR5LFxuICAgICAgICAgICAgbmV4dFxuICAgICAgICBdO1xuICAgIH0sIFtcbiAgICAgICAgZXJyb3JzLFxuICAgICAgICBsb29rdXBzXG4gICAgXSk7XG4gICAgY29uc3QgaXNMb2FkaW5nID0gX3JlYWN0LnVzZU1lbW8oKCk9PntcbiAgICAgICAgcmV0dXJuIHJlYWR5RXJyb3JzLmxlbmd0aCA8IDEgJiYgQm9vbGVhbihlcnJvcnMubGVuZ3RoKTtcbiAgICB9LCBbXG4gICAgICAgIGVycm9ycy5sZW5ndGgsXG4gICAgICAgIHJlYWR5RXJyb3JzLmxlbmd0aFxuICAgIF0pO1xuICAgIF9yZWFjdC51c2VFZmZlY3QoKCk9PntcbiAgICAgICAgaWYgKG5leHRFcnJvciA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgbGV0IG1vd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JFX18qLyBfcmVhY3QuY3JlYXRlRWxlbWVudChfT3ZlcmxheS5PdmVybGF5LCBudWxsKTtcbiAgICB9XG4gICAgaWYgKGRpc3BsYXlTdGF0ZSA9PT0gXCJoaWRkZW5cIikge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gICAgaWYgKGRpc3BsYXlTdGF0ZSA9PT0gXCJtaW5pbWl6ZWRcIikge1xuICAgICAgICByZXR1cm4gLyojX19QVVJFX18qLyBfcmVhY3QuY3JlYXRlRWxlbWVudChfVG9hc3QuVG9hc3QsIHtcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJuZXh0anMtdG9hc3QtZXJyb3JzLXBhcmVudFwiLFxuICAgICAgICAgICAgb25DbGljazogZnVsbHNjcmVlblxuICAgICAgICB9LCAvKiNfX1BVUkVfXyovIF9yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJuZXh0anMtdG9hc3QtZXJyb3JzXCJcbiAgICAgICAgfSwgLyojX19QVVJFX18qLyBfcmVhY3QuY3JlYXRlRWxlbWVudChcInN2Z1wiLCB7XG4gICAgICAgICAgICB4bWxuczogXCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiLFxuICAgICAgICAgICAgd2lkdGg6IFwiMjRcIixcbiAgICAgICAgICAgIGhlaWdodDogXCIyNFwiLFxuICAgICAgICAgICAgdmlld0JveDogXCIwIDAgMjQgMjRcIixcbiAgICAgICAgICAgIGZpbGw6IFwibm9uZVwiLFxuICAgICAgICAgICAgc3Ryb2tlOiBcImN1cnJlbnRDb2xvclwiLFxuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IFwiMlwiLFxuICAgICAgICAgICAgc3Ryb2tlTGluZWNhcDogXCJyb3VuZFwiLFxuICAgICAgICAgICAgc3Ryb2tlTGluZWpvaW46IFwicm91bmRcIlxuICAgICAgICB9LCAvKiNfX1BVUkVfXyovIF9yZWFjdC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EiLCJ4MiIsInkyIiwic3RvcFByb3BhZ2F0aW9uIiwiQ2xvc2VJY29uIiwiaXNTZXJ2ZXJFcnJvciIsImluY2x1ZGVzIiwiZ2V0RXJyb3JTb3VyY2UiLCJlcnJvciIsIkRpYWxvZyIsIm9uQ2xvc2UiLCJ1bmRlZmluZWQiLCJEaWFsb2dDb250ZW50IiwiRGlhbG9nSGVhZGVyIiwiTGVmdFJpZ2h0RGlhbG9nSGVhZGVyIiwiY2xvc2UiLCJWZXJzaW9uU3RhbGVuZXNzSW5mbyIsIkhvdGxpbmtlZFRleHQiLCJ0ZXh0IiwiRGlhbG9nQm9keSIsIlJ1bnRpbWVFcnJvciIsImtleSIsInRvU3RyaW5nIiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RootLayoutError.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RootLayoutError.js ***! \**********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n RootLayoutError: function() {\n return RootLayoutError;\n },\n styles: function() {\n return styles;\n }\n});\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _Dialog = __webpack_require__(/*! ../components/Dialog */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js\");\nconst _Overlay = __webpack_require__(/*! ../components/Overlay */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js\");\nconst _Terminal = __webpack_require__(/*! ../components/Terminal */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js\");\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n .nextjs-container-root-layout-error-header > h4 {\\n line-height: 1.5;\\n margin: 0;\\n padding: 0;\\n }\\n\\n .nextjs-container-root-layout-error-body footer {\\n margin-top: var(--size-gap);\\n }\\n .nextjs-container-root-layout-error-body footer p {\\n margin: 0;\\n }\\n\\n .nextjs-container-root-layout-error-body small {\\n color: #757575;\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst RootLayoutError = function BuildError(param) {\n _s();\n let { missingTags } = param;\n const message = \"Please make sure to include the following tags in your root layout: <html>, <body>.\\n\\n\" + (\"Missing required root layout tag\" + (missingTags.length === 1 ? \"\" : \"s\") + \": \") + missingTags.join(\", \");\n const noop = _react.default.useCallback(()=>{}, []);\n return /*#__PURE__*/ _react.default.createElement(_Overlay.Overlay, {\n fixed: true\n }, /*#__PURE__*/ _react.default.createElement(_Dialog.Dialog, {\n type: \"error\",\n \"aria-labelledby\": \"nextjs__container_root_layout_error_label\",\n \"aria-describedby\": \"nextjs__container_root_layout_error_desc\",\n onClose: noop\n }, /*#__PURE__*/ _react.default.createElement(_Dialog.DialogContent, null, /*#__PURE__*/ _react.default.createElement(_Dialog.DialogHeader, {\n className: \"nextjs-container-root-layout-error-header\"\n }, /*#__PURE__*/ _react.default.createElement(\"h4\", {\n id: \"nextjs__container_root_layout_error_label\"\n }, \"Missing required tags\")), /*#__PURE__*/ _react.default.createElement(_Dialog.DialogBody, {\n className: \"nextjs-container-root-layout-error-body\"\n }, /*#__PURE__*/ _react.default.createElement(_Terminal.Terminal, {\n content: message\n }), /*#__PURE__*/ _react.default.createElement(\"footer\", null, /*#__PURE__*/ _react.default.createElement(\"p\", {\n id: \"nextjs__container_root_layout_error_desc\"\n }, /*#__PURE__*/ _react.default.createElement(\"small\", null, \"This error and can only be dismissed by providing all required tags.\")))))));\n};\n_s(RootLayoutError, \"hHp3im7kVRcdOeKmK0+3cSEjzLI=\");\n_c = RootLayoutError;\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=RootLayoutError.js.map\nvar _c;\n$RefreshReg$(_c, \"RootLayoutError\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvUm9vdExheW91dEVycm9yLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUdOO0FBQ0EsU0FBU0csUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsUUFBUUQsSUFBSVQsT0FBT0MsY0FBYyxDQUFDTyxRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDL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cnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVJvb3RMYXlvdXRFcnJvci5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJtb2R1bGUiLCJSb290TGF5b3V0RXJyb3IiLCJzdHlsZXMiLCJfZXhwb3J0IiwidGFyZ2V0IiwiYWxsIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJfaW50ZXJvcF9yZXF1aXJlX2RlZmF1bHQiLCJyZXF1aXJlIiwiX3RhZ2dlZF90ZW1wbGF0ZV9saXRlcmFsX2xvb3NlIiwiX3JlYWN0IiwiXyIsIl9EaWFsb2ciLCJfT3ZlcmxheSIsIl9UZXJtaW5hbCIsIl9ub29wdGVtcGxhdGUiLCJfdGVtcGxhdGVPYmplY3QiLCJkYXRhIiwiQnVpbGRFcnJvciIsInBhcmFtIiwibWlzc2luZ1RhZ3MiLCJtZXNzYWdlIiwibGVuZ3RoIiwiam9pbiIsIm5vb3AiLCJkZWZhdWx0IiwidXNlQ2FsbGJhY2siLCJjcmVhdGVFbGVtZW50IiwiT3ZlcmxheSIsImZpeGVkIiwiRGlhbG9nIiwidHlwZSIsIm9uQ2xvc2UiLCJEaWFsb2dDb250ZW50IiwiRGlhbG9nSGVhZGVyIiwiY2xhc3NOYW1lIiwiaWQiLCJEaWFsb2dCb2R5IiwiVGVybWluYWwiLCJjb250ZW50IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RootLayoutError.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js": /*!**********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js ***! \**********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"CallStackFrame\", ({\n enumerable: true,\n get: function() {\n return CallStackFrame;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _stackframe = __webpack_require__(/*! ../../helpers/stack-frame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js\");\nconst _useopenineditor = __webpack_require__(/*! ../../helpers/use-open-in-editor */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js\");\nconst CallStackFrame = function CallStackFrame(param) {\n let { frame } = param;\n var _frame_originalStackFrame;\n // TODO: ability to expand resolved frames\n // TODO: render error or external indicator\n const f = (_frame_originalStackFrame = frame.originalStackFrame) != null ? _frame_originalStackFrame : frame.sourceStackFrame;\n const hasSource = Boolean(frame.originalCodeFrame);\n const open = (0, _useopenineditor.useOpenInEditor)(hasSource ? {\n file: f.file,\n lineNumber: f.lineNumber,\n column: f.column\n } : undefined);\n return /*#__PURE__*/ _react.default.createElement(\"div\", {\n \"data-nextjs-call-stack-frame\": true\n }, /*#__PURE__*/ _react.default.createElement(\"h3\", {\n \"data-nextjs-frame-expanded\": Boolean(frame.expanded)\n }, f.methodName), /*#__PURE__*/ _react.default.createElement(\"div\", {\n \"data-has-source\": hasSource ? \"true\" : undefined,\n tabIndex: hasSource ? 10 : undefined,\n role: hasSource ? \"link\" : undefined,\n onClick: open,\n title: hasSource ? \"Click to open in your editor\" : undefined\n }, /*#__PURE__*/ _react.default.createElement(\"span\", null, (0, _stackframe.getFrameSource)(f)), /*#__PURE__*/ _react.default.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n }), /*#__PURE__*/ _react.default.createElement(\"polyline\", {\n points: \"15 3 21 3 21 9\"\n }), /*#__PURE__*/ _react.default.createElement(\"line\", {\n x1: \"10\",\n y1: \"14\",\n x2: \"21\",\n y2: \"3\"\n }))));\n};\n_c = CallStackFrame;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=CallStackFrame.js.map\nvar _c;\n$RefreshReg$(_c, \"CallStackFrame\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvUnVudGltZUVycm9yL0NhbGxTdGFja0ZyYW1lLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxrREFBaUQ7SUFDN0NJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQywyQkFBMkJDLG1CQUFPQSxDQUFDLHlIQUF5QztBQUNsRixNQUFNQyxTQUFTLFdBQVcsR0FBR0YseUJBQXlCRyxDQUFDLENBQUNGLG1CQUFPQSxDQUFDLDRFQUF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wib3JpZ2luYWxTdGFja0ZyYW1lIiwic291cmNlU3RhY2tGcmFtZSIsImhhc1NvdXJjZSIsIkJvb2xlYW4iLCJvcmlnaW5hbENvZGVGcmFtZSIsIm9wZW4iLCJ1c2VPcGVuSW5FZGl0b3IiLCJmaWxlIiwibGluZU51bWJlciIsImNvbHVtbiIsInVuZGVmaW5lZCIsImRlZmF1bHQiLCJjcmVhdGVFbGVtZW50IiwiZXhwYW5kZWQiLCJtZXRob2ROYW1lIiwidGFiSW5kZXgiLCJyb2xlIiwib25DbGljayIsInRpdGxlIiwiZ2V0RnJhbWVTb3VyY2UiLCJ4bWxucyIsInZpZXdCb3giLCJmaWxsIiwic3Ryb2tlIiwic3Ryb2tlV2lkdGgiLCJzdHJva2VMaW5lY2FwIiwic3Ryb2tlTGluZWpvaW4iLCJkIiwicG9pbnRzIiwieDEiLCJ5MSIsIngyIiwieTIiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.js": /*!******************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.js ***! \******************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"ComponentStackFrameRow\", ({\n enumerable: true,\n get: function() {\n return ComponentStackFrameRow;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _useopenineditor = __webpack_require__(/*! ../../helpers/use-open-in-editor */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js\");\nfunction ComponentStackFrameRow(param) {\n let { componentStackFrame: { component, file, lineNumber, column } } = param;\n const open = (0, _useopenineditor.useOpenInEditor)({\n file,\n column,\n lineNumber\n });\n return /*#__PURE__*/ _react.default.createElement(\"div\", {\n \"data-nextjs-component-stack-frame\": true\n }, /*#__PURE__*/ _react.default.createElement(\"h3\", null, component), file ? /*#__PURE__*/ _react.default.createElement(\"div\", {\n tabIndex: 10,\n role: \"link\",\n onClick: open,\n title: \"Click to open in your editor\"\n }, /*#__PURE__*/ _react.default.createElement(\"span\", null, file, \" (\", lineNumber, \":\", column, \")\"), /*#__PURE__*/ _react.default.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n }), /*#__PURE__*/ _react.default.createElement(\"polyline\", {\n points: \"15 3 21 3 21 9\"\n }), /*#__PURE__*/ _react.default.createElement(\"line\", {\n x1: \"10\",\n y1: \"14\",\n x2: \"21\",\n y2: \"3\"\n }))) : null);\n}\n_c = ComponentStackFrameRow;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=ComponentStackFrameRow.js.map\nvar _c;\n$RefreshReg$(_c, \"ComponentStackFrameRow\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Q29tcG9uZW50U3RhY2tGcmFtZVJvdy5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiQ29tcG9uZW50U3RhY2tGcmFtZVJvdyIsIl9pbnRlcm9wX3JlcXVpcmVfZGVmYXVsdCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfIiwiX3VzZW9wZW5pbmVkaXRvciIsInBhcmFtIiwiY29tcG9uZW50U3RhY2tGcmFtZSIsImNvbXBvbmVudCIsImZpbGUiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwib3BlbiIsInVzZU9wZW5JbkVkaXRvciIsImRlZmF1bHQiLCJjcmVhdGVFbGVtZW50IiwidGFiSW5kZXgiLCJyb2xlIiwib25DbGljayIsInRpdGxlIiwieG1sbnMiLCJ2aWV3Qm94IiwiZmlsbCIsInN0cm9rZSIsInN0cm9rZVdpZHRoIiwic3Ryb2tlTGluZWNhcCIsInN0cm9rZUxpbmVqb2luIiwiZCIsInBvaW50cyIsIngxIiwieTEiLCJ4MiIsInkyIiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/FrameworkIcon.js": /*!*********************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/FrameworkIcon.js ***! \*********************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"FrameworkIcon\", ({\n enumerable: true,\n get: function() {\n return FrameworkIcon;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nfunction FrameworkIcon(param) {\n let { framework } = param;\n if (framework === \"react\") {\n return /*#__PURE__*/ _react.default.createElement(\"svg\", {\n \"data-nextjs-call-stack-framework-icon\": \"react\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 410 369\",\n fill: \"none\",\n shapeRendering: \"geometricPrecision\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"5\"\n }, /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M204.995 224.552C226.56 224.552 244.042 207.07 244.042 185.506C244.042 163.941 226.56 146.459 204.995 146.459C183.43 146.459 165.948 163.941 165.948 185.506C165.948 207.07 183.43 224.552 204.995 224.552Z\",\n fill: \"currentColor\"\n }), /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M409.99 184.505C409.99 153.707 381.437 126.667 335.996 108.925C343.342 60.6535 334.19 22.3878 307.492 6.98883C283.649 -6.77511 250.631 -0.0395641 214.512 25.9753C211.316 28.2692 208.143 30.7097 204.97 33.2477C201.822 30.7097 198.65 28.2692 195.477 25.9753C159.359 -0.0395641 126.34 -6.79951 102.497 6.98883C75.8237 22.3878 66.6721 60.6291 74.0422 108.852C28.5529 126.618 0 153.682 0 184.505C0 215.303 28.5528 242.342 73.9934 260.084C66.6477 308.356 75.7993 346.621 102.497 362.02C110.575 366.682 119.727 369 129.684 369C149.085 369 171.61 360.215 195.477 343.034C198.674 340.74 201.847 338.3 205.019 335.762C208.167 338.3 211.34 340.74 214.512 343.034C238.38 360.239 260.905 369 280.306 369C290.263 369 299.415 366.682 307.492 362.02C331.335 348.256 342 316.287 337.534 271.993C337.143 268.089 336.631 264.135 335.996 260.109C381.461 242.367 409.99 215.327 409.99 184.505ZM225.934 41.8136C246.238 27.1955 265.127 19.5814 280.306 19.5814C286.871 19.5814 292.728 20.9968 297.731 23.8765C315.204 33.9798 322.672 62.9475 317.327 102.433C299.756 97.0401 280.306 92.9158 259.392 90.2802C246.872 73.8074 233.597 58.9453 220.003 46.2551C221.98 44.7421 223.957 43.229 225.934 41.8136ZM112.259 23.8765C117.262 20.9968 123.119 19.5814 129.684 19.5814C144.863 19.5814 163.752 27.1711 184.056 41.8136C186.033 43.229 188.01 44.7176 189.986 46.2551C176.393 58.9453 163.142 73.783 150.622 90.2558C129.732 92.8914 110.258 97.0401 92.687 102.409C87.3424 62.9475 94.7857 33.9798 112.259 23.8765ZM19.5233 184.505C19.5233 164.322 40.9014 143.359 77.776 128.253C81.9003 146.141 88.0502 165.054 96.1768 184.456C88.0014 203.881 81.8515 222.819 77.7272 240.732C40.9014 225.626 19.5233 204.687 19.5233 184.505ZM184.056 327.196C154.966 348.134 128.805 354.675 112.259 345.133C94.7857 335.029 87.3181 306.062 92.6626 266.576C110.234 271.969 129.684 276.093 150.598 278.729C163.117 295.202 176.393 310.064 189.986 322.754C188.01 324.292 186.033 325.78 184.056 327.196ZM204.995 310.04C180.591 287.685 157.138 257.815 137.347 223.551C132.051 214.4 121.344 191.396 117 182.489C113.535 190.786 110.112 198.398 107.427 206.5C109.623 210.575 118.092 229.213 120.434 233.288C125.071 241.317 129.928 249.127 134.931 256.692C120.898 254.227 107.915 251.055 96.1035 247.321C102.815 217.011 116.213 182.064 137.347 145.458C142.545 136.453 153.838 116.346 159.5 108C150.568 109.147 143.395 108.767 135 110.5C132.56 114.453 122.777 131.645 120.434 135.721C115.749 143.823 111.454 151.925 107.427 159.978C102.546 146.581 98.8124 133.744 96.1524 121.64C125.755 112.293 162.727 106.411 204.995 106.411C215.562 106.411 237.63 106.197 247.49 106.905C242.048 99.7544 237.38 93.2819 231.694 86.888C227.082 86.7416 209.705 86.888 204.995 86.888C195.672 86.888 186.545 87.2053 177.589 87.7422C186.472 77.1752 195.672 67.5111 204.995 58.9697C229.375 81.3239 252.851 111.195 272.643 145.458C277.841 154.463 289.073 175.426 293.49 184.505C296.98 176.207 300.281 168.64 302.99 160.489C300.793 156.389 291.898 139.747 289.555 135.696C284.918 127.667 280.062 119.858 275.059 112.317C289.092 114.782 302.075 117.954 313.886 121.688C307.175 151.998 293.777 186.945 272.643 223.551C267.445 232.556 252.651 253.178 246.99 261.524C255.922 260.377 265.595 258.663 273.99 256.93C276.43 252.976 287.212 237.364 289.555 233.288C294.216 225.235 298.512 217.182 302.489 209.153C307.224 222.185 310.982 234.997 313.715 247.394C284.138 256.741 247.214 262.598 204.995 262.598C194.428 262.598 169.859 261.208 160 260.5C165.442 267.65 171.304 275.095 176.99 281.489C181.602 281.635 200.285 282.121 204.995 282.121C214.317 282.121 223.444 281.804 232.401 281.267C223.493 291.834 214.317 301.498 204.995 310.04ZM297.731 345.133C281.185 354.699 254.999 348.159 225.934 327.196C223.957 325.78 221.98 324.292 220.003 322.754C233.597 310.064 246.848 295.226 259.367 278.753C280.233 276.118 299.659 271.993 317.205 266.625C317.547 269.089 317.888 271.554 318.132 273.97C321.72 309.649 314.277 335.566 297.731 345.133ZM332.262 240.756C328.065 222.599 321.842 203.686 313.813 184.578C321.988 165.152 328.138 146.215 332.262 128.302C369.088 143.408 390.466 164.322 390.466 184.505C390.466 204.687 369.113 225.626 332.262 240.756Z\",\n fill: \"currentColor\"\n }));\n }\n return /*#__PURE__*/ _react.default.createElement(\"svg\", {\n \"data-nextjs-call-stack-framework-icon\": \"next\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 180 180\",\n fill: \"none\"\n }, /*#__PURE__*/ _react.default.createElement(\"mask\", {\n id: \"mask0_408_139\",\n maskUnits: \"userSpaceOnUse\",\n x: \"0\",\n y: \"0\",\n width: \"180\",\n height: \"180\"\n }, /*#__PURE__*/ _react.default.createElement(\"circle\", {\n cx: \"90\",\n cy: \"90\",\n r: \"90\",\n fill: \"black\"\n })), /*#__PURE__*/ _react.default.createElement(\"g\", {\n mask: \"url(#mask0_408_139)\"\n }, /*#__PURE__*/ _react.default.createElement(\"circle\", {\n cx: \"90\",\n cy: \"90\",\n r: \"87\",\n fill: \"black\",\n stroke: \"white\",\n strokeWidth: \"6\"\n }), /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M149.508 157.52L69.142 54H54V125.97H66.1136V69.3836L139.999 164.845C143.333 162.614 146.509 160.165 149.508 157.52Z\",\n fill: \"url(#paint0_linear_408_139)\"\n }), /*#__PURE__*/ _react.default.createElement(\"rect\", {\n x: \"115\",\n y: \"54\",\n width: \"12\",\n height: \"72\",\n fill: \"url(#paint1_linear_408_139)\"\n })), /*#__PURE__*/ _react.default.createElement(\"defs\", null, /*#__PURE__*/ _react.default.createElement(\"linearGradient\", {\n id: \"paint0_linear_408_139\",\n x1: \"109\",\n y1: \"116.5\",\n x2: \"144.5\",\n y2: \"160.5\",\n gradientUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/ _react.default.createElement(\"stop\", {\n stopColor: \"white\"\n }), /*#__PURE__*/ _react.default.createElement(\"stop\", {\n offset: \"1\",\n stopColor: \"white\",\n stopOpacity: \"0\"\n })), /*#__PURE__*/ _react.default.createElement(\"linearGradient\", {\n id: \"paint1_linear_408_139\",\n x1: \"121\",\n y1: \"54\",\n x2: \"120.799\",\n y2: \"106.875\",\n gradientUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/ _react.default.createElement(\"stop\", {\n stopColor: \"white\"\n }), /*#__PURE__*/ _react.default.createElement(\"stop\", {\n offset: \"1\",\n stopColor: \"white\",\n stopOpacity: \"0\"\n }))));\n}\n_c = FrameworkIcon;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=FrameworkIcon.js.map\nvar _c;\n$RefreshReg$(_c, \"FrameworkIcon\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvUnVudGltZUVycm9yL0ZyYW1ld29ya0ljb24uanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILGlEQUFnRDtJQUM1Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDJCQUEyQkMsbUJBQU9BLENBQUMseUhBQXlDO0FBQ2xGLE1BQU1DLFNBQVMsV0FBVyxHQUFHRix5QkFBeUJHLENBQUMsQ0FBQ0YsbUJBQU9BLENBQUMsNEVBQU87QUFDdkUsU0FBU0YsY0FBY0ssS0FBSztJQUN4QixJQUFJLEVBQUVDLFNBQVMsRUFBRyxHQUFHRDtJQUNyQixJQUFJQyxjQUFjLFNBQVM7UUFDdkIsT0FBTyxXQUFXLEdBQUdILE9BQU9JLE9BQU8sQ0FBQ0MsYUFBYSxDQUFDLE9BQU87WUFDckQseUNBQXlDO1lBQ3pDQyxPQUFPO1lBQ1BDLE9BQU87WUFDUEMsUUFBUTtZQUNSQyxTQUFTO1lBQ1RDLE1BQU07WUFDTkMsZ0JBQWdCO1lBQ2hCQyxRQUFRO1lBQ1JDLGVBQWU7WUFDZkMsZ0JBQWdCO1lBQ2hCQyxhQUFhO1FBQ2pCLEdBQUcsV0FBVyxHQUFHZixPQUFPSSxPQUFPLENB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TD1GcmFtZXdvcmtJY29uLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJGcmFtZXdvcmtJY29uIiwiX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0IiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJwYXJhbSIsImZyYW1ld29yayIsImRlZmF1bHQiLCJjcmVhdGVFbGVtZW50IiwieG1sbnMiLCJ3aWR0aCIsImhlaWdodCIsInZpZXdCb3giLCJmaWxsIiwic2hhcGVSZW5kZXJpbmciLCJzdHJva2UiLCJzdHJva2VMaW5lY2FwIiwic3Ryb2tlTGluZWpvaW4iLCJzdHJva2VXaWR0aCIsImQiLCJpZCIsIm1hc2tVbml0cyIsIngiLCJ5IiwiY3giLCJjeSIsInIiLCJtYXNrIiwieDEiLCJ5MSIsIngyIiwieTIiLCJncmFkaWVudFVuaXRzIiwic3RvcENvbG9yIiwib2Zmc2V0Iiwic3RvcE9wYWNpdHkiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/FrameworkIcon.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.js": /*!**************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.js ***! \**************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"GroupedStackFrames\", ({\n enumerable: true,\n get: function() {\n return GroupedStackFrames;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _CallStackFrame = __webpack_require__(/*! ./CallStackFrame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js\");\nconst _FrameworkIcon = __webpack_require__(/*! ./FrameworkIcon */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/FrameworkIcon.js\");\nfunction FrameworkGroup(param) {\n let { framework, stackFrames, all } = param;\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(\"details\", {\n \"data-nextjs-collapsed-call-stack-details\": true\n }, /*#__PURE__*/ _react.default.createElement(\"summary\", {\n tabIndex: 10\n }, /*#__PURE__*/ _react.default.createElement(\"svg\", {\n \"data-nextjs-call-stack-chevron-icon\": true,\n fill: \"none\",\n height: \"20\",\n width: \"20\",\n shapeRendering: \"geometricPrecision\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"2\",\n viewBox: \"0 0 24 24\"\n }, /*#__PURE__*/ _react.default.createElement(\"path\", {\n d: \"M9 18l6-6-6-6\"\n })), /*#__PURE__*/ _react.default.createElement(_FrameworkIcon.FrameworkIcon, {\n framework: framework\n }), framework === \"react\" ? \"React\" : \"Next.js\"), stackFrames.map((frame, index)=>/*#__PURE__*/ _react.default.createElement(_CallStackFrame.CallStackFrame, {\n key: \"call-stack-\" + index + \"-\" + all,\n frame: frame\n }))));\n}\n_c = FrameworkGroup;\nfunction GroupedStackFrames(param) {\n let { groupedStackFrames, all } = param;\n return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, groupedStackFrames.map((stackFramesGroup, groupIndex)=>{\n // Collapse React and Next.js frames\n if (stackFramesGroup.framework) {\n return /*#__PURE__*/ _react.default.createElement(FrameworkGroup, {\n key: \"call-stack-framework-group-\" + groupIndex + \"-\" + all,\n framework: stackFramesGroup.framework,\n stackFrames: stackFramesGroup.stackFrames,\n all: all\n });\n }\n return stackFramesGroup.stackFrames.map((frame, frameIndex)=>/*#__PURE__*/ _react.default.createElement(_CallStackFrame.CallStackFrame, {\n key: \"call-stack-\" + groupIndex + \"-\" + frameIndex + \"-\" + all,\n frame: frame\n }));\n }));\n}\n_c1 = GroupedStackFrames;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=GroupedStackFrames.js.map\nvar _c, _c1;\n$RefreshReg$(_c, \"FrameworkGroup\");\n$RefreshReg$(_c1, \"GroupedStackFrames\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvUnVudGltZUVycm9yL0dyb3VwZWRTdGFja0ZyYW1lcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsMkJBQTJCQyxtQkFBT0EsQ0FBQyx5SEFBeUM7QUFDbEYsTUFBTUMsU0FBUyxXQUFXLEdBQUdGLHlCQUF5QkcsQ0FBQyxDQUFDRixtQkFBT0EsQ0FBQyw0RUFBTztBQUN2RSxNQUFNRyxrQkFBa0JILG1CQUFPQSxDQUFDLHFKQUFr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HVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js": /*!*************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js ***! \*************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n styles: function() {\n return styles;\n },\n RuntimeError: function() {\n return RuntimeError;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _CodeFrame = __webpack_require__(/*! ../../components/CodeFrame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js\");\nconst _nooptemplate = __webpack_require__(/*! ../../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nconst _groupstackframesbyframework = __webpack_require__(/*! ../../helpers/group-stack-frames-by-framework */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/group-stack-frames-by-framework.js\");\nconst _CallStackFrame = __webpack_require__(/*! ./CallStackFrame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.js\");\nconst _GroupedStackFrames = __webpack_require__(/*! ./GroupedStackFrames */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.js\");\nconst _ComponentStackFrameRow = __webpack_require__(/*! ./ComponentStackFrameRow */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n button[data-nextjs-data-runtime-error-collapsed-action] {\\n background: none;\\n border: none;\\n padding: 0;\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-bigger);\\n color: var(--color-accents-3);\\n }\\n\\n [data-nextjs-call-stack-frame]:not(:last-child),\\n [data-nextjs-component-stack-frame]:not(:last-child) {\\n margin-bottom: var(--size-gap-double);\\n }\\n\\n [data-nextjs-call-stack-frame] > h3,\\n [data-nextjs-component-stack-frame] > h3 {\\n margin-top: 0;\\n margin-bottom: var(--size-gap);\\n font-family: var(--font-stack-monospace);\\n font-size: var(--size-font);\\n color: #222;\\n }\\n [data-nextjs-call-stack-frame] > h3[data-nextjs-frame-expanded='false'] {\\n color: #666;\\n }\\n [data-nextjs-call-stack-frame] > div,\\n [data-nextjs-component-stack-frame] > div {\\n display: flex;\\n align-items: center;\\n padding-left: calc(var(--size-gap) + var(--size-gap-half));\\n font-size: var(--size-font-small);\\n color: #999;\\n }\\n [data-nextjs-call-stack-frame] > div > svg,\\n [data-nextjs-component-stack-frame] > div > svg {\\n width: auto;\\n height: var(--size-font-small);\\n margin-left: var(--size-gap);\\n\\n display: none;\\n }\\n\\n [data-nextjs-call-stack-frame] > div[data-has-source],\\n [data-nextjs-component-stack-frame] > div {\\n cursor: pointer;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source]:hover,\\n [data-nextjs-component-stack-frame] > div:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source] > svg,\\n [data-nextjs-component-stack-frame] > div > svg {\\n display: unset;\\n }\\n\\n [data-nextjs-call-stack-framework-icon] {\\n margin-right: var(--size-gap);\\n }\\n [data-nextjs-call-stack-framework-icon='next'] > mask {\\n mask-type: alpha;\\n }\\n [data-nextjs-call-stack-framework-icon='react'] {\\n color: rgb(20, 158, 202);\\n }\\n [data-nextjs-collapsed-call-stack-details][open]\\n [data-nextjs-call-stack-chevron-icon] {\\n transform: rotate(90deg);\\n }\\n [data-nextjs-collapsed-call-stack-details] summary {\\n display: flex;\\n align-items: center;\\n margin: var(--size-gap-double) 0;\\n list-style: none;\\n }\\n [data-nextjs-collapsed-call-stack-details] summary::-webkit-details-marker {\\n display: none;\\n }\\n\\n [data-nextjs-collapsed-call-stack-details] h3 {\\n color: #666;\\n }\\n [data-nextjs-collapsed-call-stack-details] [data-nextjs-call-stack-frame] {\\n margin-bottom: var(--size-gap-double);\\n }\\n\"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nconst RuntimeError = function RuntimeError(param) {\n _s();\n let { error } = param;\n const firstFirstPartyFrameIndex = _react.useMemo(()=>{\n return error.frames.findIndex((entry)=>entry.expanded && Boolean(entry.originalCodeFrame) && Boolean(entry.originalStackFrame));\n }, [\n error.frames\n ]);\n const firstFrame = _react.useMemo(()=>{\n var _error_frames_firstFirstPartyFrameIndex;\n return (_error_frames_firstFirstPartyFrameIndex = error.frames[firstFirstPartyFrameIndex]) != null ? _error_frames_firstFirstPartyFrameIndex : null;\n }, [\n error.frames,\n firstFirstPartyFrameIndex\n ]);\n const allLeadingFrames = _react.useMemo(()=>firstFirstPartyFrameIndex < 0 ? [] : error.frames.slice(0, firstFirstPartyFrameIndex), [\n error.frames,\n firstFirstPartyFrameIndex\n ]);\n const [all, setAll] = _react.useState(firstFrame == null);\n const toggleAll = _react.useCallback(()=>{\n setAll((v)=>!v);\n }, []);\n const leadingFrames = _react.useMemo(()=>allLeadingFrames.filter((f)=>f.expanded || all), [\n all,\n allLeadingFrames\n ]);\n const allCallStackFrames = _react.useMemo(()=>error.frames.slice(firstFirstPartyFrameIndex + 1), [\n error.frames,\n firstFirstPartyFrameIndex\n ]);\n const visibleCallStackFrames = _react.useMemo(()=>allCallStackFrames.filter((f)=>f.expanded || all), [\n all,\n allCallStackFrames\n ]);\n const canShowMore = _react.useMemo(()=>{\n return allCallStackFrames.length !== visibleCallStackFrames.length || all && firstFrame != null;\n }, [\n all,\n allCallStackFrames.length,\n firstFrame,\n visibleCallStackFrames.length\n ]);\n const stackFramesGroupedByFramework = _react.useMemo(()=>(0, _groupstackframesbyframework.groupStackFramesByFramework)(visibleCallStackFrames), [\n visibleCallStackFrames\n ]);\n return /*#__PURE__*/ _react.createElement(_react.Fragment, null, firstFrame ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"h2\", null, \"Source\"), leadingFrames.map((frame, index)=>/*#__PURE__*/ _react.createElement(_CallStackFrame.CallStackFrame, {\n key: \"leading-frame-\" + index + \"-\" + all,\n frame: frame\n })), /*#__PURE__*/ _react.createElement(_CodeFrame.CodeFrame, {\n stackFrame: firstFrame.originalStackFrame,\n codeFrame: firstFrame.originalCodeFrame\n })) : undefined, error.componentStackFrames ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"h2\", null, \"Component Stack\"), error.componentStackFrames.map((componentStackFrame, index)=>/*#__PURE__*/ _react.createElement(_ComponentStackFrameRow.ComponentStackFrameRow, {\n key: index,\n componentStackFrame: componentStackFrame\n }))) : null, stackFramesGroupedByFramework.length ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"h2\", null, \"Call Stack\"), /*#__PURE__*/ _react.createElement(_GroupedStackFrames.GroupedStackFrames, {\n groupedStackFrames: stackFramesGroupedByFramework,\n all: all\n })) : undefined, canShowMore ? /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"button\", {\n tabIndex: 10,\n \"data-nextjs-data-runtime-error-collapsed-action\": true,\n type: \"button\",\n onClick: toggleAll\n }, all ? \"Hide\" : \"Show\", \" collapsed frames\")) : undefined);\n};\n_s(RuntimeError, \"WFPEdU7gcPz7APeSuJfuh3Ceu/U=\");\n_c = RuntimeError;\nconst styles = (0, _nooptemplate.noop)(_templateObject());\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\nvar _c;\n$RefreshReg$(_c, \"RuntimeError\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9jb250YWluZXIvUnVudGltZUVycm9yL2luZGV4LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUdOO0FBQ0EsU0FBU0csUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsUUFBUUQsSUFBSVQsT0FBT0MsY0FBYyxDQUFDTyxRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDLEtBQUtILEdBQUcsQ0FBQ0MsS0FBSztJQUNsQjtBQUNKO0FBQ0FILFFBQVFMLFNBQVM7SUFDYkcsUUFBUTtRQUNKLE9BQU9BO0lBQ1g7SUFDQUMsY0FBYztRQUNWLE9BQU9BO0lBQ1g7QUFDSjtBQUNBLE1BQU1PLDRCQUE0QkMsbUJBQU9BLENBQUMsMkhBQTBDO0FBQ3BGLE1BQU1DLGlDQUFpQ0QsbUJBQU9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ENhbGxTdGFja0ZyYW1lcyIsInZpc2libGVDYWxsU3RhY2tGcmFtZXMiLCJjYW5TaG93TW9yZSIsImxlbmd0aCIsInN0YWNrRnJhbWVzR3JvdXBlZEJ5RnJhbWV3b3JrIiwiZ3JvdXBTdGFja0ZyYW1lc0J5RnJhbWV3b3JrIiwiY3JlYXRlRWxlbWVudCIsIkZyYWdtZW50IiwibWFwIiwiZnJhbWUiLCJpbmRleCIsIkNhbGxTdGFja0ZyYW1lIiwia2V5IiwiQ29kZUZyYW1lIiwic3RhY2tGcmFtZSIsImNvZGVGcmFtZSIsInVuZGVmaW5lZCIsImNvbXBvbmVudFN0YWNrRnJhbWVzIiwiY29tcG9uZW50U3RhY2tGcmFtZSIsIkNvbXBvbmVudFN0YWNrRnJhbWVSb3ciLCJHcm91cGVkU3RhY2tGcmFtZXMiLCJncm91cGVkU3RhY2tGcmFtZXMiLCJ0YWJJbmRleCIsInR5cGUiLCJvbkNsaWNrIiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js": /*!******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js ***! \******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ACTION_BUILD_OK: function() {\n return ACTION_BUILD_OK;\n },\n ACTION_BUILD_ERROR: function() {\n return ACTION_BUILD_ERROR;\n },\n ACTION_BEFORE_REFRESH: function() {\n return ACTION_BEFORE_REFRESH;\n },\n ACTION_REFRESH: function() {\n return ACTION_REFRESH;\n },\n ACTION_UNHANDLED_ERROR: function() {\n return ACTION_UNHANDLED_ERROR;\n },\n ACTION_UNHANDLED_REJECTION: function() {\n return ACTION_UNHANDLED_REJECTION;\n },\n ACTION_VERSION_INFO: function() {\n return ACTION_VERSION_INFO;\n },\n ACTION_NOT_FOUND: function() {\n return ACTION_NOT_FOUND;\n },\n errorOverlayReducer: function() {\n return errorOverlayReducer;\n }\n});\nconst ACTION_BUILD_OK = \"build-ok\";\nconst ACTION_BUILD_ERROR = \"build-error\";\nconst ACTION_BEFORE_REFRESH = \"before-fast-refresh\";\nconst ACTION_REFRESH = \"fast-refresh\";\nconst ACTION_UNHANDLED_ERROR = \"unhandled-error\";\nconst ACTION_UNHANDLED_REJECTION = \"unhandled-rejection\";\nconst ACTION_VERSION_INFO = \"version-info\";\nconst ACTION_NOT_FOUND = \"not-found\";\nfunction pushErrorFilterDuplicates(errors, err) {\n return [\n ...errors.filter((e)=>{\n // Filter out duplicate errors\n return e.event.reason !== err.event.reason;\n }),\n err\n ];\n}\nconst errorOverlayReducer = (state, action)=>{\n switch(action.type){\n case ACTION_BUILD_OK:\n {\n return {\n ...state,\n buildError: null,\n notFound: false\n };\n }\n case ACTION_BUILD_ERROR:\n {\n return {\n ...state,\n buildError: action.message\n };\n }\n case ACTION_BEFORE_REFRESH:\n {\n return {\n ...state,\n refreshState: {\n type: \"pending\",\n errors: []\n }\n };\n }\n case ACTION_NOT_FOUND:\n {\n return {\n ...state,\n notFound: true\n };\n }\n case ACTION_REFRESH:\n {\n return {\n ...state,\n buildError: null,\n notFound: false,\n errors: // and UNHANDLED_REJECTION events might be dispatched between the\n // BEFORE_REFRESH and the REFRESH event. We want to keep those errors\n // around until the next refresh. Otherwise we run into a race\n // condition where those errors would be cleared on refresh completion\n // before they can be displayed.\n state.refreshState.type === \"pending\" ? state.refreshState.errors : [],\n refreshState: {\n type: \"idle\"\n }\n };\n }\n case ACTION_UNHANDLED_ERROR:\n case ACTION_UNHANDLED_REJECTION:\n {\n switch(state.refreshState.type){\n case \"idle\":\n {\n return {\n ...state,\n nextId: state.nextId + 1,\n errors: pushErrorFilterDuplicates(state.errors, {\n id: state.nextId,\n event: action\n })\n };\n }\n case \"pending\":\n {\n return {\n ...state,\n nextId: state.nextId + 1,\n refreshState: {\n ...state.refreshState,\n errors: pushErrorFilterDuplicates(state.refreshState.errors, {\n id: state.nextId,\n event: action\n })\n }\n };\n }\n default:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = state.refreshState;\n return state;\n }\n }\n case ACTION_VERSION_INFO:\n {\n return {\n ...state,\n versionInfo: action.versionInfo\n };\n }\n default:\n {\n return state;\n }\n }\n};\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=error-overlay-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9lcnJvci1vdmVybGF5LXJlZHVjZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FVTjtBQUNBLFNBQVNVLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUloQixPQUFPQyxjQUFjLENBQUNjLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUVos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kVKRUNUSU9OID0gXCJ1bmhhbmRsZWQtcmVqZWN0aW9uXCI7XG5jb25zdCBBQ1RJT05fVkVSU0lPTl9JTkZPID0gXCJ2ZXJzaW9uLWluZm9cIjtcbmNvbnN0IEFDVElPTl9OT1RfRk9VTkQgPSBcIm5vdC1mb3VuZFwiO1xuZnVuY3Rpb24gcHVzaEVycm9yRmlsdGVyRHVwbGljYXRlcyhlcnJvcnMsIGVycikge1xuICAgIHJldHVybiBbXG4gICAgICAgIC4uLmVycm9ycy5maWx0ZXIoKGUpPT57XG4gICAgICAgICAgICAvLyBGaWx0ZXIgb3V0IGR1cGxpY2F0ZSBlcnJvcnNcbiAgICAgICAgICAgIHJldHVybiBlLmV2ZW50LnJlYXNvbiAhPT0gZXJyLmV2ZW50LnJlYXNvbjtcbiAgICAgICAgfSksXG4gICAgICAgIGVyclxuICAgIF07XG59XG5jb25zdCBlcnJvck92ZXJsYXlSZWR1Y2VyID0gKHN0YXRlLCBhY3Rpb24pPT57XG4gICAgc3dpdGNoKGFjdGlvbi50eXBlKXtcbiAgICAgICAgY2FzZSBBQ1RJT05fQlVJTERfT0s6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1aWxkRXJyb3I6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG5vdEZvdW5kOiBmYWxzZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgQUNUSU9OX0JVSUxEX0VSUk9SOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgICAgICAgICBidWlsZEVycm9yOiBhY3Rpb24ubWVzc2FnZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgQUNUSU9OX0JFRk9SRV9SRUZSRVNIOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoU3RhdGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwicGVuZGluZ1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzOiBbXVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgY2FzZSBBQ1RJT05fTk9UX0ZPVU5EOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgICAgICAgICBub3RGb3VuZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgQUNUSU9OX1JFRlJFU0g6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1aWxkRXJyb3I6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG5vdEZvdW5kOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzOiAvLyBFcnJvcnMgY2FuIGNvbWUgaW4gZHVyaW5nIHVwZGF0ZXMuIEluIHRoaXMgY2FzZSwgVU5IQU5ETEVEX0VSUk9SXG4gICAgICAgICAgICAgICAgICAgIC8vIGFuZCBVTkhBTkRMRURfUkVKRUNUSU9OIGV2ZW50cyBtaWdodCBiZSBkaXNwYXRjaGVkIGJldHdlZW4gdGhlXG4gICAgICAgICAgICAgICAgICAgIC8vIEJFRk9SRV9SRUZSRVNIIGFuZCB0aGUgUkVGUkVTSCBldmVudC4gV2Ugd2FudCB0byBrZWVwIHRob3NlIGVycm9yc1xuICAgICAgICAgICAgICAgICAgICAvLyBhcm91bmQgdW50aWwgdGhlIG5leHQgcmVmcmVzaC4gT3RoZXJ3aXNlIHdlIHJ1biBpbnRvIGEgcmFjZVxuICAgICAgICAgICAgICAgICAgICAvLyBjb25kaXRpb24gd2hlcmUgdGhvc2UgZXJyb3JzIHdvdWxkIGJlIGNsZWFyZWQgb24gcmVmcmVzaCBjb21wbGV0aW9uXG4gICAgICAgICAgICAgICAgICAgIC8vIGJlZm9yZSB0aGV5IGNhbiBiZSBkaXNwbGF5ZWQuXG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLnJlZnJlc2hTdGF0ZS50eXBlID09PSBcInBlbmRpbmdcIiA/IHN0YXRlLnJlZnJlc2hTdGF0ZS5lcnJvcnMgOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFN0YXRlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImlkbGVcIlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgY2FzZSBBQ1RJT05fVU5IQU5ETEVEX0VSUk9SOlxuICAgICAgICBjYXNlIEFDVElPTl9VTkhBTkRMRURfUkVKRUNUSU9OOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHN3aXRjaChzdGF0ZS5yZWZyZXNoU3RhdGUudHlwZSl7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXCJpZGxlXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRJZDogc3RhdGUubmV4dElkICsgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzOiBwdXNoRXJyb3JGaWx0ZXJEdXBsaWNhdGVzKHN0YXRlLmVycm9ycywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHN0YXRlLm5leHRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50OiBhY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwicGVuZGluZ1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0SWQ6IHN0YXRlLm5leHRJZCArIDEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hTdGF0ZToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGUucmVmcmVzaFN0YXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzOiBwdXNoRXJyb3JGaWx0ZXJEdXBsaWNhdGVzKHN0YXRlLnJlZnJlc2hTdGF0ZS5lcnJvcnMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogc3RhdGUubmV4dElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50OiBhY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFyc1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgXyA9IHN0YXRlLnJlZnJlc2hTdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgQUNUSU9OX1ZFUlNJT05fSU5GTzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgdmVyc2lvbkluZm86IGFjdGlvbi52ZXJzaW9uSW5mb1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICAgICAgfVxuICAgIH1cbn07XG5cbmlmICgodHlwZW9mIGV4cG9ydHMuZGVmYXVsdCA9PT0gJ2Z1bmN0aW9uJyB8fCAodHlwZW9mIGV4cG9ydHMuZGVmYXVsdCA9PT0gJ29iamVjdCcgJiYgZXhwb3J0cy5kZWZhdWx0ICE9PSBudWxsKSkgJiYgdHlwZW9mIGV4cG9ydHMuZGVmYXVsdC5fX2VzTW9kdWxlID09PSAndW5kZWZpbmVkJykge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWVycm9yLW92ZXJsYXktcmVkdWNlci5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJtb2R1bGUiLCJBQ1RJT05fQlVJTERfT0siLCJBQ1RJT05fQlVJTERfRVJST1IiLCJBQ1RJT05fQkVGT1JFX1JFRlJFU0giLCJBQ1RJT05fUkVGUkVTSCIsIkFDVElPTl9VTkhBTkRMRURfRVJST1IiLCJBQ1RJT05fVU5IQU5ETEVEX1JFSkVDVElPTiIsIkFDVElPTl9WRVJTSU9OX0lORk8iLCJBQ1RJT05fTk9UX0ZPVU5EIiwiZXJyb3JPdmVybGF5UmVkdWNlciIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsInB1c2hFcnJvckZpbHRlckR1cGxpY2F0ZXMiLCJlcnJvcnMiLCJlcnIiLCJmaWx0ZXIiLCJlIiwiZXZlbnQiLCJyZWFzb24iLCJzdGF0ZSIsImFjdGlvbiIsInR5cGUiLCJidWlsZEVycm9yIiwibm90Rm91bmQiLCJtZXNzYWdlIiwicmVmcmVzaFN0YXRlIiwibmV4dElkIiwiaWQiLCJfIiwidmVyc2lvbkluZm8iLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-protocol.js": /*!************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-protocol.js ***! \************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getSocketProtocol\", ({\n enumerable: true,\n get: function() {\n return getSocketProtocol;\n }\n}));\nfunction getSocketProtocol(assetPrefix) {\n let protocol = window.location.protocol;\n try {\n // assetPrefix is a url\n protocol = new URL(assetPrefix).protocol;\n } catch (_) {}\n return protocol === \"http:\" ? \"ws\" : \"wss\";\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=get-socket-protocol.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL2dldC1zb2NrZXQtcHJvdG9jb2wuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILHFEQUFvRDtJQUNoREksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLFNBQVNBLGtCQUFrQkMsV0FBVztJQUNsQyxJQUFJQyxXQUFXQyxPQUFPQyxRQUFRLENBQUNGLFFBQVE7SUFDdkMsSUFBSTtRQUNBLHVCQUF1QjtRQUN2QkEsV0FBVyxJQUFJRyxJQUFJSixhQUFhQyxRQUFRO0lBQzVDLEVBQUUsT0FBT0ksR0FBRyxDQUFDO0lBQ2IsT0FBT0osYUFBYSxVQUFVLE9BQU87QUFDekM7QUFFQSxJQUFJLENBQUMsT0FBT04sUUFBUVcsT0FBTyxLQUFLLGNBQWUsT0FBT1gsUUFBUVcsT0FBTyxLQUFLLFlBQVlYLFFBQVFXLE9BQU8sS0FBSyxJQUFJLE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IHByb3RvY29sID09PSBcImh0dHA6XCIgPyBcIndzXCIgOiBcIndzc1wiO1xufVxuXG5pZiAoKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdmdW5jdGlvbicgfHwgKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdvYmplY3QnICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1nZXQtc29ja2V0LXByb3RvY29sLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJnZXRTb2NrZXRQcm90b2NvbCIsImFzc2V0UHJlZml4IiwicHJvdG9jb2wiLCJ3aW5kb3ciLCJsb2NhdGlvbiIsIlVSTCIsIl8iLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-protocol.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js ***! \*******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getErrorByType\", ({\n enumerable: true,\n get: function() {\n return getErrorByType;\n }\n}));\nconst _erroroverlayreducer = __webpack_require__(/*! ../error-overlay-reducer */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/error-overlay-reducer.js\");\nconst _nodeStackFrames = __webpack_require__(/*! ./nodeStackFrames */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/nodeStackFrames.js\");\nconst _stackframe = __webpack_require__(/*! ./stack-frame */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js\");\nasync function getErrorByType(ev) {\n const { id, event } = ev;\n switch(event.type){\n case _erroroverlayreducer.ACTION_UNHANDLED_ERROR:\n case _erroroverlayreducer.ACTION_UNHANDLED_REJECTION:\n {\n const readyRuntimeError = {\n id,\n runtime: true,\n error: event.reason,\n frames: await (0, _stackframe.getOriginalStackFrames)(event.frames, (0, _nodeStackFrames.getErrorSource)(event.reason), event.reason.toString())\n };\n if (event.type === _erroroverlayreducer.ACTION_UNHANDLED_ERROR) {\n readyRuntimeError.componentStackFrames = event.componentStackFrames;\n }\n return readyRuntimeError;\n }\n default:\n {\n break;\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = event;\n throw new Error(\"type system invariant violation\");\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=getErrorByType.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3Zlc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ja0ZyYW1lcyIsIl9zdGFja2ZyYW1lIiwiZXYiLCJpZCIsImV2ZW50IiwidHlwZSIsIkFDVElPTl9VTkhBTkRMRURfRVJST1IiLCJBQ1RJT05fVU5IQU5ETEVEX1JFSkVDVElPTiIsInJlYWR5UnVudGltZUVycm9yIiwicnVudGltZSIsImVycm9yIiwicmVhc29uIiwiZnJhbWVzIiwiZ2V0T3JpZ2luYWxTdGFja0ZyYW1lcyIsImdldEVycm9yU291cmNlIiwidG9TdHJpbmciLCJjb21wb25lbnRTdGFja0ZyYW1lcyIsIl8iLCJFcnJvciIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/group-stack-frames-by-framework.js": /*!************************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/group-stack-frames-by-framework.js ***! \************************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"groupStackFramesByFramework\", ({\n enumerable: true,\n get: function() {\n return groupStackFramesByFramework;\n }\n}));\n/**\n * Get the origin framework of the stack frame by package name.\n */ function getFramework(sourcePackage) {\n if (!sourcePackage) return undefined;\n if (/^(react|react-dom|react-is|react-refresh|react-server-dom-webpack|scheduler)$/.test(sourcePackage)) {\n return \"react\";\n } else if (sourcePackage === \"next\") {\n return \"next\";\n }\n return undefined;\n}\nfunction groupStackFramesByFramework(stackFrames) {\n const stackFramesGroupedByFramework = [];\n for (const stackFrame of stackFrames){\n const currentGroup = stackFramesGroupedByFramework[stackFramesGroupedByFramework.length - 1];\n const framework = getFramework(stackFrame.sourcePackage);\n if (currentGroup && currentGroup.framework === framework) {\n currentGroup.stackFrames.push(stackFrame);\n } else {\n stackFramesGroupedByFramework.push({\n framework: framework,\n stackFrames: [\n stackFrame\n ]\n });\n }\n }\n return stackFramesGroupedByFramework;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=group-stack-frames-by-framework.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL2dyb3VwLXN0YWNrLWZyYW1lcy1ieS1mcmFtZXdvcmsuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILCtEQUE4RDtJQUMxREksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGOztDQUVDLEdBQUcsU0FBU0MsYUFBYUMsYUFBYTtJQUNuQyxJQUFJLENBQUNBLGVBQWUsT0FBT0M7SUFDM0IsSUFBSSxnRkFBZ0ZDLElBQUksQ0FBQ0YsZ0JBQWdCO1FBQ3JHLE9BQU87SUFDWCxPQUFPLElBQUlBLGtCQUFrQixRQUFRO1FBQ2pDLE9BQU87SUFDWDtJQUNBLE9BQU9DO0FBQ1g7QUFDQSxTQUFTSCw0QkFBNEJLLFdBQVc7SUFDNUMsTUFBTUMsZ0NBQWdDLEVBQUU7SUFDeEMsS0FBSyxNQUFNQyxjQUFjRixZQUFZO1FBQ2pDLE1BQU1HLGVBQWVGLDZCQUE2QixDQUFDQSw4QkFB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NYXBwaW5nVVJMPWdyb3VwLXN0YWNrLWZyYW1lcy1ieS1mcmFtZXdvcmsuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsImdyb3VwU3RhY2tGcmFtZXNCeUZyYW1ld29yayIsImdldEZyYW1ld29yayIsInNvdXJjZVBhY2thZ2UiLCJ1bmRlZmluZWQiLCJ0ZXN0Iiwic3RhY2tGcmFtZXMiLCJzdGFja0ZyYW1lc0dyb3VwZWRCeUZyYW1ld29yayIsInN0YWNrRnJhbWUiLCJjdXJyZW50R3JvdXAiLCJsZW5ndGgiLCJmcmFtZXdvcmsiLCJwdXNoIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/group-stack-frames-by-framework.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js": /*!*************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js ***! \*************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n hydrationErrorWarning: function() {\n return hydrationErrorWarning;\n },\n hydrationErrorComponentStack: function() {\n return hydrationErrorComponentStack;\n },\n patchConsoleError: function() {\n return patchConsoleError;\n }\n});\nlet hydrationErrorWarning;\nlet hydrationErrorComponentStack;\n// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference\nconst knownHydrationWarnings = new Set([\n 'Warning: Text content did not match. Server: \"%s\" Client: \"%s\"%s',\n \"Warning: Expected server HTML to contain a matching <%s> in <%s>.%s\",\n 'Warning: Expected server HTML to contain a matching text node for \"%s\" in <%s>.%s',\n \"Warning: Did not expect server HTML to contain a <%s> in <%s>.%s\",\n 'Warning: Did not expect server HTML to contain the text node \"%s\" in <%s>.%s'\n]);\nfunction patchConsoleError() {\n const prev = console.error;\n console.error = function(msg, serverContent, clientContent, componentStack) {\n if (knownHydrationWarnings.has(msg)) {\n hydrationErrorWarning = msg.replace(\"%s\", serverContent).replace(\"%s\", clientContent).replace(\"%s\", \"\");\n hydrationErrorComponentStack = componentStack;\n }\n // @ts-expect-error argument is defined\n prev.apply(console, arguments);\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=hydration-error-info.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL2h5ZHJhdGlvbi1lcnJvci1pbmZvLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBSU47QUFDQSxTQUFTSSxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVixPQUFPQyxjQUFjLENBQUNRLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBU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uRXJyb3JXYXJuaW5nIiwiaHlkcmF0aW9uRXJyb3JDb21wb25lbnRTdGFjayIsInBhdGNoQ29uc29sZUVycm9yIiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0Iiwia25vd25IeWRyYXRpb25XYXJuaW5ncyIsIlNldCIsInByZXYiLCJjb25zb2xlIiwiZXJyb3IiLCJtc2ciLCJzZXJ2ZXJDb250ZW50IiwiY2xpZW50Q29udGVudCIsImNvbXBvbmVudFN0YWNrIiwiaGFzIiwicmVwbGFjZSIsImFwcGx5IiwiYXJndW1lbnRzIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/nodeStackFrames.js": /*!********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/nodeStackFrames.js ***! \********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getFilesystemFrame: function() {\n return getFilesystemFrame;\n },\n getErrorSource: function() {\n return getErrorSource;\n },\n decorateServerError: function() {\n return decorateServerError;\n },\n getServerError: function() {\n return getServerError;\n }\n});\nconst _stacktraceparser = __webpack_require__(/*! next/dist/compiled/stacktrace-parser */ \"(app-client)/./node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js\");\nfunction getFilesystemFrame(frame) {\n const f = {\n ...frame\n };\n if (typeof f.file === \"string\") {\n if (f.file.startsWith(\"/\") || // Win32:\n /^[a-z]:\\\\/i.test(f.file) || // Win32 UNC:\n f.file.startsWith(\"\\\\\\\\\")) {\n f.file = \"file://\" + f.file;\n }\n }\n return f;\n}\nconst symbolError = Symbol(\"NextjsError\");\nfunction getErrorSource(error) {\n return error[symbolError] || null;\n}\nfunction decorateServerError(error, type) {\n Object.defineProperty(error, symbolError, {\n writable: false,\n enumerable: false,\n configurable: false,\n value: type\n });\n}\nfunction getServerError(error, type) {\n let n;\n try {\n throw new Error(error.message);\n } catch (e) {\n n = e;\n }\n n.name = error.name;\n try {\n n.stack = n.toString() + \"\\n\" + (0, _stacktraceparser.parse)(error.stack).map(getFilesystemFrame).map((f)=>{\n let str = \" at \" + f.methodName;\n if (f.file) {\n let loc = f.file;\n if (f.lineNumber) {\n loc += \":\" + f.lineNumber;\n if (f.column) {\n loc += \":\" + f.column;\n }\n }\n str += \" (\" + loc + \")\";\n }\n return str;\n }).join(\"\\n\");\n } catch (e) {\n n.stack = error.stack;\n }\n decorateServerError(n, type);\n return n;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=nodeStackFrames.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL25vZGVTdGFja0ZyYW1lcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUtOO0FBQ0EsU0FBU0ssUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsU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sIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJfc3RhY2t0cmFjZXBhcnNlciIsInJlcXVpcmUiLCJmcmFtZSIsImYiLCJmaWxlIiwic3RhcnRzV2l0aCIsInRlc3QiLCJzeW1ib2xFcnJvciIsIlN5bWJvbCIsImVycm9yIiwidHlwZSIsIndyaXRhYmxlIiwiY29uZmlndXJhYmxlIiwibiIsIkVycm9yIiwibWVzc2FnZSIsImUiLCJzdGFjayIsInRvU3RyaW5nIiwicGFyc2UiLCJtYXAiLCJzdHIiLCJtZXRob2ROYW1lIiwibG9jIiwibGluZU51bWJlciIsImNvbHVtbiIsImpvaW4iLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/nodeStackFrames.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js": /*!******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js ***! \******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"noop\", ({\n enumerable: true,\n get: function() {\n return noop;\n }\n}));\nfunction noop(strings) {\n for(var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){\n keys[_key - 1] = arguments[_key];\n }\n const lastIndex = strings.length - 1;\n return strings.slice(0, lastIndex).reduce((p, s, i)=>p + s + keys[i], \"\") + strings[lastIndex];\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=noop-template.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMapping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zW2ldLCBcIlwiKSArIHN0cmluZ3NbbGFzdEluZGV4XTtcbn1cblxuaWYgKCh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnZnVuY3Rpb24nIHx8ICh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bm9vcC10ZW1wbGF0ZS5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0Iiwibm9vcCIsInN0cmluZ3MiLCJfbGVuIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwia2V5cyIsIkFycmF5IiwiX2tleSIsImxhc3RJbmRleCIsInNsaWNlIiwicmVkdWNlIiwicCIsInMiLCJpIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js": /*!**************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js ***! \**************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"parseComponentStack\", ({\n enumerable: true,\n get: function() {\n return parseComponentStack;\n }\n}));\nfunction parseComponentStack(componentStack) {\n const componentStackFrames = [];\n for (const line of componentStack.trim().split(\"\\n\")){\n // Get component and file from the component stack line\n const match = /at ([^ ]+)( \\((.*)\\))?/.exec(line);\n if (match == null ? void 0 : match[1]) {\n const component = match[1];\n const webpackFile = match[3];\n // Stop parsing the component stack if we reach a Next.js component\n if (webpackFile == null ? void 0 : webpackFile.includes(\"next/dist\")) {\n break;\n }\n const modulePath = webpackFile == null ? void 0 : webpackFile.replace(/^(webpack-internal:\\/\\/\\/|file:\\/\\/)(\\(.*\\)\\/)?/, \"\");\n var _modulePath_split;\n const [file, lineNumber, column] = (_modulePath_split = modulePath == null ? void 0 : modulePath.split(\":\")) != null ? _modulePath_split : [];\n componentStackFrames.push({\n component,\n file,\n lineNumber: lineNumber ? Number(lineNumber) : undefined,\n column: column ? Number(column) : undefined\n });\n }\n }\n return componentStackFrames;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=parse-component-stack.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3BhcnNlLWNvbXBvbmVudC1zdGFjay5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM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JleGVjIiwiY29tcG9uZW50Iiwid2VicGFja0ZpbGUiLCJpbmNsdWRlcyIsIm1vZHVsZVBhdGgiLCJyZXBsYWNlIiwiX21vZHVsZVBhdGhfc3BsaXQiLCJmaWxlIiwibGluZU51bWJlciIsImNvbHVtbiIsInB1c2giLCJOdW1iZXIiLCJ1bmRlZmluZWQiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parse-component-stack.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parseStack.js": /*!***************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parseStack.js ***! \***************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"parseStack\", ({\n enumerable: true,\n get: function() {\n return parseStack;\n }\n}));\nconst _stacktraceparser = __webpack_require__(/*! next/dist/compiled/stacktrace-parser */ \"(app-client)/./node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js\");\nconst regexNextStatic = /\\/_next(\\/static\\/.+)/g;\nfunction parseStack(stack) {\n const frames = (0, _stacktraceparser.parse)(stack);\n return frames.map((frame)=>{\n try {\n const url = new URL(frame.file);\n const res = regexNextStatic.exec(url.pathname);\n if (res) {\n var _process_env___NEXT_DIST_DIR_replace, _process_env___NEXT_DIST_DIR;\n const distDir = (_process_env___NEXT_DIST_DIR_replace = (_process_env___NEXT_DIST_DIR = \"C:\\\\Users\\\\Jenni\\\\Documents\\\\USB\\\\2023\\\\Sep - Dic 2023\\\\Sistema de Informacion 1\\\\proyect\\\\glik-web\\\\.next\") == null ? void 0 : _process_env___NEXT_DIST_DIR.replace(/\\\\/g, \"/\")) == null ? void 0 : _process_env___NEXT_DIST_DIR_replace.replace(/\\/$/, \"\");\n if (distDir) {\n frame.file = \"file://\" + distDir.concat(res.pop());\n }\n }\n } catch (e) {}\n return frame;\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=parseStack.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3BhcnNlU3RhY2suanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDhDQUE2QztJQUN6Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLG9CQUFvQkMsbUJBQU9BLENBQUMsd0lBQXNDO0FBQ3hFLE1BQU1DLGtCQUFrQjtBQUN4QixTQUFTSCxXQUFXSSxLQUFLO0lBQ3JCLE1BQU1DLFNBQVMsQ0FBQyxHQUFHSixrQkFBa0JLLEtBQUssRUFBRUY7SUFDNUMsT0FBT0MsT0FBT0UsR0FBRyxDQUFDLENBQUNDO1FBQ2YsSUFBSTtZQUNBLE1BQU1DLE1BQU0sSUFBSUMsSUFBSUYsTUFBTUcsSUFBSTtZQUM5QixNQUFNQyxNQUFNVCxnQkFBZ0JVLElBQUksQ0FBQ0osSUFBSUssUUFBUTtZQUM3QyxJQUFJRixLQUFLO2dCQUNMLElBQUlHLHNDQUFzQ0M7Z0JBQzFDLE1BQU1DLFVBQVUsQ0FBQ0Y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FwIiwiZnJhbWUiLCJ1cmwiLCJVUkwiLCJmaWxlIiwicmVzIiwiZXhlYyIsInBhdGhuYW1lIiwiX3Byb2Nlc3NfZW52X19fTkVYVF9ESVNUX0RJUl9yZXBsYWNlIiwiX3Byb2Nlc3NfZW52X19fTkVYVF9ESVNUX0RJUiIsImRpc3REaXIiLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX0RJU1RfRElSIiwicmVwbGFjZSIsImNvbmNhdCIsInBvcCIsImUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/parseStack.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js": /*!****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js ***! \****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n getOriginalStackFrame: function() {\n return getOriginalStackFrame;\n },\n getOriginalStackFrames: function() {\n return getOriginalStackFrames;\n },\n getFrameSource: function() {\n return getFrameSource;\n }\n});\nfunction getOriginalStackFrame(source, type, errorMessage) {\n var _source_file, _source_file1;\n async function _getOriginalStackFrame() {\n var /* collapsed */ _source_file, _body_originalStackFrame, _body_originalStackFrame_file;\n const params = new URLSearchParams();\n params.append(\"isServer\", String(type === \"server\"));\n params.append(\"isEdgeServer\", String(type === \"edge-server\"));\n params.append(\"isAppDirectory\", \"true\");\n params.append(\"errorMessage\", errorMessage);\n for(const key in source){\n var _source_key;\n params.append(key, ((_source_key = source[key]) != null ? _source_key : \"\").toString());\n }\n const controller = new AbortController();\n const tm = setTimeout(()=>controller.abort(), 3000);\n const res = await self.fetch(( false || \"\") + \"/__nextjs_original-stack-frame?\" + params.toString(), {\n signal: controller.signal\n }).finally(()=>{\n clearTimeout(tm);\n });\n if (!res.ok || res.status === 204) {\n return Promise.reject(new Error(await res.text()));\n }\n const body = await res.json();\n var _ref;\n return {\n error: false,\n reason: null,\n external: false,\n expanded: !Boolean((_ref = ((_source_file = source.file) == null ? void 0 : _source_file.includes(\"node_modules\")) || ((_body_originalStackFrame = body.originalStackFrame) == null ? void 0 : (_body_originalStackFrame_file = _body_originalStackFrame.file) == null ? void 0 : _body_originalStackFrame_file.includes(\"node_modules\"))) != null ? _ref : true),\n sourceStackFrame: source,\n originalStackFrame: body.originalStackFrame,\n originalCodeFrame: body.originalCodeFrame || null,\n sourcePackage: body.sourcePackage\n };\n }\n if (!(((_source_file = source.file) == null ? void 0 : _source_file.startsWith(\"webpack-internal:\")) || ((_source_file1 = source.file) == null ? void 0 : _source_file1.startsWith(\"file:\")))) {\n return Promise.resolve({\n error: false,\n reason: null,\n external: true,\n expanded: false,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null\n });\n }\n var _err_message, _ref;\n return _getOriginalStackFrame().catch((err)=>{\n return {\n error: true,\n reason: (_ref = (_err_message = err == null ? void 0 : err.message) != null ? _err_message : err == null ? void 0 : err.toString()) != null ? _ref : \"Unknown Error\",\n external: false,\n expanded: false,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null\n };\n });\n}\nfunction getOriginalStackFrames(frames, type, errorMessage) {\n return Promise.all(frames.map((frame)=>getOriginalStackFrame(frame, type, errorMessage)));\n}\nfunction getFrameSource(frame) {\n let str = \"\";\n try {\n var _globalThis_location;\n const u = new URL(frame.file);\n // Strip the origin for same-origin scripts.\n if (typeof globalThis !== \"undefined\" && ((_globalThis_location = globalThis.location) == null ? void 0 : _globalThis_location.origin) !== u.origin) {\n // URLs can be valid without an `origin`, so long as they have a\n // `protocol`. However, `origin` is preferred.\n if (u.origin === \"null\") {\n str += u.protocol;\n } else {\n str += u.origin;\n }\n }\n // Strip query string information as it's typically too verbose to be\n // meaningful.\n str += u.pathname;\n str += \" \";\n } catch (e) {\n str += (frame.file || \"(unknown)\") + \" \";\n }\n if (frame.lineNumber != null) {\n if (frame.column != null) {\n str += \"(\" + frame.lineNumber + \":\" + frame.column + \") \";\n } else {\n str += \"(\" + frame.lineNumber + \") \";\n }\n }\n return str.slice(0, -1);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=stack-frame.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3N0YWNrLWZyYW1lLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBSU47QUFDQSxTQUFTSSxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVixPQUFPQyxjQUFjLENBQUNRLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUU4sU0FBUztJQUNiRyx1QkFBdUI7UUFDbkIsT0FBT0E7SUFDWDtJQUNBQyx3QkFBd0I7UUFDcEIsT0FBT0E7SUFDWDtJQUNBQyxnQkFBZ0I7UUFDWixPQUFPQTtJQUNYO0FBQ0o7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AgICAgICAvLyBVUkxzIGNhbiBiZSB2YWxpZCB3aXRob3V0IGFuIGBvcmlnaW5gLCBzbyBsb25nIGFzIHRoZXkgaGF2ZSBhXG4gICAgICAgICAgICAvLyBgcHJvdG9jb2xgLiBIb3dldmVyLCBgb3JpZ2luYCBpcyBwcmVmZXJyZWQuXG4gICAgICAgICAgICBpZiAodS5vcmlnaW4gPT09IFwibnVsbFwiKSB7XG4gICAgICAgICAgICAgICAgc3RyICs9IHUucHJvdG9jb2w7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN0ciArPSB1Lm9yaWdpbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBTdHJpcCBxdWVyeSBzdHJpbmcgaW5mb3JtYXRpb24gYXMgaXQncyB0eXBpY2FsbHkgdG9vIHZlcmJvc2UgdG8gYmVcbiAgICAgICAgLy8gbWVhbmluZ2Z1bC5cbiAgICAgICAgc3RyICs9IHUucGF0aG5hbWU7XG4gICAgICAgIHN0ciArPSBcIiBcIjtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHN0ciArPSAoZnJhbWUuZmlsZSB8fCBcIih1bmtub3duKVwiKSArIFwiIFwiO1xuICAgIH1cbiAgICBpZiAoZnJhbWUubGluZU51bWJlciAhPSBudWxsKSB7XG4gICAgICAgIGlmIChmcmFtZS5jb2x1bW4gIT0gbnVsbCkge1xuICAgICAgICAgICAgc3RyICs9IFwiKFwiICsgZnJhbWUubGluZU51bWJlciArIFwiOlwiICsgZnJhbWUuY29sdW1uICsgXCIpIFwiO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc3RyICs9IFwiKFwiICsgZnJhbWUubGluZU51bWJlciArIFwiKSBcIjtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gc3RyLnNsaWNlKDAsIC0xKTtcbn1cblxuaWYgKCh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnZnVuY3Rpb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ImZldGNoIiwicHJvY2VzcyIsImVudiIsIl9fTkVYVF9ST1VURVJfQkFTRVBBVEgiLCJzaWduYWwiLCJmaW5hbGx5IiwiY2xlYXJUaW1lb3V0Iiwib2siLCJzdGF0dXMiLCJQcm9taXNlIiwicmVqZWN0IiwiRXJyb3IiLCJ0ZXh0IiwiYm9keSIsImpzb24iLCJfcmVmIiwiZXJyb3IiLCJyZWFzb24iLCJleHRlcm5hbCIsImV4cGFuZGVkIiwiQm9vbGVhbiIsImZpbGUiLCJpbmNsdWRlcyIsIm9yaWdpbmFsU3RhY2tGcmFtZSIsInNvdXJjZVN0YWNrRnJhbWUiLCJvcmlnaW5hbENvZGVGcmFtZSIsInNvdXJjZVBhY2thZ2UiLCJzdGFydHNXaXRoIiwicmVzb2x2ZSIsIl9lcnJfbWVzc2FnZSIsImNhdGNoIiwiZXJyIiwibWVzc2FnZSIsImZyYW1lcyIsIm1hcCIsImZyYW1lIiwic3RyIiwiX2dsb2JhbFRoaXNfbG9jYXRpb24iLCJ1IiwiVVJMIiwiZ2xvYmFsVGhpcyIsImxvY2F0aW9uIiwib3JpZ2luIiwicHJvdG9jb2wiLCJwYXRobmFtZSIsImUiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwic2xpY2UiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/stack-frame.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js ***! \**********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n RuntimeErrorHandler: function() {\n return RuntimeErrorHandler;\n },\n useErrorHandler: function() {\n return useErrorHandler;\n }\n});\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nconst _hydrationerrorinfo = __webpack_require__(/*! ./hydration-error-info */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/hydration-error-info.js\");\nconst _isnextroutererror = __webpack_require__(/*! ../../../is-next-router-error */ \"(app-client)/./node_modules/next/dist/client/components/is-next-router-error.js\");\nconst RuntimeErrorHandler = {\n hadRuntimeError: false\n};\nfunction isHydrationError(error) {\n return error.message.match(/(hydration|content does not match|did not match)/i) != null;\n}\nif (true) {\n try {\n // Increase the number of stack frames on the client\n Error.stackTraceLimit = 50;\n } catch (e) {}\n}\nconst errorQueue = [];\nconst rejectionQueue = [];\nconst errorHandlers = [];\nconst rejectionHandlers = [];\nif (true) {\n // These event handlers must be added outside of the hook because there is no\n // guarantee that the hook will be alive in a mounted component in time to\n // when the errors occur.\n window.addEventListener(\"error\", (ev)=>{\n if ((0, _isnextroutererror.isNextRouterError)(ev.error)) {\n ev.preventDefault();\n return;\n }\n const error = ev == null ? void 0 : ev.error;\n if (!error || !(error instanceof Error) || typeof error.stack !== \"string\") {\n // A non-error was thrown, we don't have anything to show. :-(\n return;\n }\n if (isHydrationError(error) && !error.message.includes(\"https://nextjs.org/docs/messages/react-hydration-error\")) {\n if (_hydrationerrorinfo.hydrationErrorWarning) {\n // The patched console.error found hydration errors logged by React\n // Append the logged warning to the error message\n error.message += \"\\n\\n\" + _hydrationerrorinfo.hydrationErrorWarning;\n }\n if (_hydrationerrorinfo.hydrationErrorComponentStack) {\n error._componentStack = _hydrationerrorinfo.hydrationErrorComponentStack;\n }\n error.message += \"\\n\\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error\";\n }\n const e = error;\n errorQueue.push(e);\n for (const handler of errorHandlers){\n handler(e);\n }\n });\n window.addEventListener(\"unhandledrejection\", (ev)=>{\n const reason = ev == null ? void 0 : ev.reason;\n if (!reason || !(reason instanceof Error) || typeof reason.stack !== \"string\") {\n // A non-error was thrown, we don't have anything to show. :-(\n return;\n }\n const e = reason;\n rejectionQueue.push(e);\n for (const handler of rejectionHandlers){\n handler(e);\n }\n });\n}\nfunction useErrorHandler(handleOnUnhandledError, handleOnUnhandledRejection) {\n (0, _react.useEffect)(()=>{\n // Handle queued errors.\n errorQueue.forEach(handleOnUnhandledError);\n rejectionQueue.forEach(handleOnUnhandledRejection);\n // Listen to new errors.\n errorHandlers.push(handleOnUnhandledError);\n rejectionHandlers.push(handleOnUnhandledRejection);\n return ()=>{\n // Remove listeners.\n errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1);\n rejectionHandlers.splice(rejectionHandlers.indexOf(handleOnUnhandledRejection), 1);\n };\n }, [\n handleOnUnhandledError,\n handleOnUnhandledRejection\n ]);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-error-handler.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3VzZS1lcnJvci1oYW5kbGVyLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBR047QUFDQSxTQUFTRyxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVCxPQ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Y29tcG9uZW50U3RhY2sgPSBfaHlkcmF0aW9uZXJyb3JpbmZvLmh5ZHJhdGlvbkVycm9yQ29tcG9uZW50U3RhY2s7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlcnJvci5tZXNzYWdlICs9IFwiXFxuXFxuU2VlIG1vcmUgaW5mbyBoZXJlOiBodHRwczovL25leHRqcy5vcmcvZG9jcy9tZXNzYWdlcy9yZWFjdC1oeWRyYXRpb24tZXJyb3JcIjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBlID0gZXJyb3I7XG4gICAgICAgIGVycm9yUXVldWUucHVzaChlKTtcbiAgICAgICAgZm9yIChjb25zdCBoYW5kbGVyIG9mIGVycm9ySGFuZGxlcnMpe1xuICAgICAgICAgICAgaGFuZGxlcihlKTtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKFwidW5oYW5kbGVkcmVqZWN0aW9uXCIsIChldik9PntcbiAgICAgICAgY29uc3QgcmVhc29uID0gZXYgPT0gbnVsbCA/IHZvaWQgMCA6IGV2LnJlYXNvbjtcbiAgICAgICAgaWYgKCFyZWFzb24gfHwgIShyZWFzb24gaW5zdGFuY2VvZiBFcnJvcikgfHwgdHlwZW9mIHJlYXNvbi5zdGFjayAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgLy8gQSBub24tZXJyb3Igd2FzIHRocm93biwgd2UgZG9uJ3QgaGF2ZSBhbnl0aGluZyB0byBzaG93LiA6LShcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBlID0gcmVhc29uO1xuICAgICAgICByZWplY3Rpb25RdWV1ZS5wdXNoKGUpO1xuICAgICAgICBmb3IgKGNvbnN0IGhhbmRsZXIgb2YgcmVqZWN0aW9uSGFuZGxlcnMpe1xuICAgICAgICAgICAgaGFuZGxlcihlKTtcbiAgICAgICAgfVxuICAgIH0pO1xufVxuZnVuY3Rpb24gdXNlRXJ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2siLCJfY29tcG9uZW50U3RhY2siLCJwdXNoIiwiaGFuZGxlciIsInJlYXNvbiIsImhhbmRsZU9uVW5oYW5kbGVkRXJyb3IiLCJoYW5kbGVPblVuaGFuZGxlZFJlamVjdGlvbiIsInVzZUVmZmVjdCIsImZvckVhY2giLCJzcGxpY2UiLCJpbmRleE9mIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js": /*!***********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js ***! \***********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"useOpenInEditor\", ({\n enumerable: true,\n get: function() {\n return useOpenInEditor;\n }\n}));\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nfunction useOpenInEditor(param) {\n let { file, lineNumber, column } = param === void 0 ? {} : param;\n const openInEditor = (0, _react.useCallback)(()=>{\n if (file == null || lineNumber == null || column == null) return;\n const params = new URLSearchParams();\n params.append(\"file\", file);\n params.append(\"lineNumber\", String(lineNumber));\n params.append(\"column\", String(column));\n self.fetch(( false || \"\") + \"/__nextjs_launch-editor?\" + params.toString()).then(()=>{}, ()=>{\n console.error(\"There was an issue opening this code in your editor.\");\n });\n }, [\n file,\n lineNumber,\n column\n ]);\n return openInEditor;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-open-in-editor.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }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09ICdvYmplY3QnICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD11c2Utb3Blbi1pbi1lZGl0b3IuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsInVzZU9wZW5JbkVkaXRvciIsIl9yZWFjdCIsInJlcXVpcmUiLCJwYXJhbSIsImZpbGUiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwib3BlbkluRWRpdG9yIiwidXNlQ2FsbGJhY2siLCJwYXJhbXMiLCJVUkxTZWFyY2hQYXJhbXMiLCJhcHBlbmQiLCJTdHJpbmciLCJzZWxmIiwiZmV0Y2giLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX1JPVVRFUl9CQVNFUEFUSCIsInRvU3RyaW5nIiwidGhlbiIsImNvbnNvbGUiLCJlcnJvciIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js": /*!******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js ***! \******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n useWebsocket: function() {\n return useWebsocket;\n },\n useSendMessage: function() {\n return useSendMessage;\n },\n useWebsocketPing: function() {\n return useWebsocketPing;\n }\n});\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nconst _approutercontext = __webpack_require__(/*! ../../../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _getsocketprotocol = __webpack_require__(/*! ./get-socket-protocol */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-protocol.js\");\nfunction useWebsocket(assetPrefix) {\n const webSocketRef = (0, _react.useRef)();\n (0, _react.useEffect)(()=>{\n if (webSocketRef.current) {\n return;\n }\n const { hostname, port } = window.location;\n const protocol = (0, _getsocketprotocol.getSocketProtocol)(assetPrefix);\n const normalizedAssetPrefix = assetPrefix.replace(/^\\/+/, \"\");\n let url = protocol + \"://\" + hostname + \":\" + port + (normalizedAssetPrefix ? \"/\" + normalizedAssetPrefix : \"\");\n if (normalizedAssetPrefix.startsWith(\"http\")) {\n url = protocol + \"://\" + normalizedAssetPrefix.split(\"://\")[1];\n }\n webSocketRef.current = new window.WebSocket(\"\" + url + \"/_next/webpack-hmr\");\n }, [\n assetPrefix\n ]);\n return webSocketRef;\n}\nfunction useSendMessage(webSocketRef) {\n const sendMessage = (0, _react.useCallback)((data)=>{\n const socket = webSocketRef.current;\n if (!socket || socket.readyState !== socket.OPEN) {\n return;\n }\n return socket.send(data);\n }, [\n webSocketRef\n ]);\n return sendMessage;\n}\nfunction useWebsocketPing(websocketRef) {\n _s();\n const sendMessage = useSendMessage(websocketRef);\n const { tree } = (0, _react.useContext)(_approutercontext.GlobalLayoutRouterContext);\n (0, _react.useEffect)(()=>{\n // Taken from on-demand-entries-client.js\n const interval = setInterval(()=>{\n sendMessage(JSON.stringify({\n event: \"ping\",\n tree,\n appDirRoute: true\n }));\n }, 2500);\n return ()=>clearInterval(interval);\n }, [\n tree,\n sendMessage\n ]);\n}\n_s(useWebsocketPing, \"wUse5NG7XMV1uhKK1kY0LLDje8k=\", false, function() {\n return [\n useSendMessage\n ];\n});\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-websocket.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3VzZS13ZWJzb2NrZXQuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBSU47QUFDQSxTQUFTSSxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVixPQUFPQyxjQUFjLENBQUNRLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUU4sU0FBUztJQUNiRyxjQUFjO1FBQ1YsT0FBT0E7SUFDWDtJQUNBQyxnQkFBZ0I7UUFDWixPQUFPQTtJQUNYO0lBQ0FDLGtCQUFrQjtRQUNkLE9BQU9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m90b2NvbCIsImFzc2V0UHJlZml4Iiwid2ViU29ja2V0UmVmIiwidXNlUmVmIiwidXNlRWZmZWN0IiwiY3VycmVudCIsImhvc3RuYW1lIiwicG9ydCIsIndpbmRvdyIsImxvY2F0aW9uIiwicHJvdG9jb2wiLCJnZXRTb2NrZXRQcm90b2NvbCIsIm5vcm1hbGl6ZWRBc3NldFByZWZpeCIsInJlcGxhY2UiLCJ1cmwiLCJzdGFydHNXaXRoIiwic3BsaXQiLCJXZWJTb2NrZXQiLCJzZW5kTWVzc2FnZSIsInVzZUNhbGxiYWNrIiwiZGF0YSIsInNvY2tldCIsInJlYWR5U3RhdGUiLCJPUEVOIiwic2VuZCIsIndlYnNvY2tldFJlZiIsInRyZWUiLCJ1c2VDb250ZXh0IiwiR2xvYmFsTGF5b3V0Um91dGVyQ29udGV4dCIsImludGVydmFsIiwic2V0SW50ZXJ2YWwiLCJKU09OIiwic3RyaW5naWZ5IiwiZXZlbnQiLCJhcHBEaXJSb3V0ZSIsImNsZWFySW50ZXJ2YWwiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-websocket.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js": /*!***********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js ***! \***********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"useOnClickOutside\", ({\n enumerable: true,\n get: function() {\n return useOnClickOutside;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nfunction useOnClickOutside(el, handler) {\n _s();\n _react.useEffect(()=>{\n if (el == null || handler == null) {\n return;\n }\n const listener = (e)=>{\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(e.target)) {\n return;\n }\n handler(e);\n };\n const root = el.getRootNode();\n root.addEventListener(\"mousedown\", listener);\n root.addEventListener(\"touchstart\", listener);\n return function() {\n root.removeEventListener(\"mousedown\", listener);\n root.removeEventListener(\"touchstart\", listener);\n };\n }, [\n handler,\n el\n ]);\n}\n_s(useOnClickOutside, \"OD7bBpZva5O2jO+Puf00hKivP7c=\");\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-on-click-outside.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9ob29rcy91c2Utb24tY2xpY2stb3V0c2lkZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILHFEQUFvRDtJQUNoREksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDRCQUE0QkMsbUJBQU9BLENBQUMsMkhBQTBDO0FBQ3BGLE1BQU1DLFNBQVMsV0FBVyxHQUFHRiwwQkFBMEJHLENBQUMsQ0FBQ0YsbUJBQU9BLENB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ZU1hcHBpbmdVUkw9dXNlLW9uLWNsaWNrLW91dHNpZGUuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsInVzZU9uQ2xpY2tPdXRzaWRlIiwiX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfIiwiZWwiLCJoYW5kbGVyIiwidXNlRWZmZWN0IiwibGlzdGVuZXIiLCJlIiwiY29udGFpbnMiLCJ0YXJnZXQiLCJyb290IiwiZ2V0Um9vdE5vZGUiLCJhZGRFdmVudExpc3RlbmVyIiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/hooks/use-on-click-outside.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"CloseIcon\", ({\n enumerable: true,\n get: function() {\n return CloseIcon;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst CloseIcon = ()=>{\n return /*#__PURE__*/ _react.createElement(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, /*#__PURE__*/ _react.createElement(\"path\", {\n d: \"M18 6L6 18\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), /*#__PURE__*/ _react.createElement(\"path\", {\n d: \"M6 6L18 18\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n};\n_c = CloseIcon;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=CloseIcon.js.map\nvar _c;\n$RefreshReg$(_c, \"CloseIcon\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9pY29ucy9DbG9zZUljb24uanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDZDQUE0QztJQUN4Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDRCQUE0QkMsbUJBQU9BLENBQUMsMkhBQTBDO0FBQ3BGLE1BQU1DLFNBQVMsV0FBVyxHQUFHRiwwQkFBMEJHLENBQUMsQ0FBQ0YsbUJBQU9BLENBQUMsNEVBQU87QUFDeEUsTUFBTUYsWUFBWTtJQUNkLE9BQU8sV0FBVyxHQUFHRyxPQUFPRSxhQUFhLENBQUMsT0FBTztRQUM3Q0MsT0FBT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WxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/icons/CloseIcon.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js": /*!********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js ***! \********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Base\", ({\n enumerable: true,\n get: function() {\n return Base;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n :host {\\n --size-gap-half: 4px;\\n --size-gap: 8px;\\n --size-gap-double: 16px;\\n --size-gap-triple: 24px;\\n --size-gap-quad: 32px;\\n\\n --size-font-small: 14px;\\n --size-font: 16px;\\n --size-font-big: 20px;\\n --size-font-bigger: 24px;\\n\\n --color-accents-1: #808080;\\n --color-accents-2: #222222;\\n --color-accents-3: #404040;\\n\\n --font-stack-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono',\\n Menlo, Courier, monospace;\\n\\n --color-ansi-selection: rgba(95, 126, 151, 0.48);\\n --color-ansi-bg: #111111;\\n --color-ansi-fg: #cccccc;\\n\\n --color-ansi-white: #777777;\\n --color-ansi-black: #141414;\\n --color-ansi-blue: #00aaff;\\n --color-ansi-cyan: #88ddff;\\n --color-ansi-green: #98ec65;\\n --color-ansi-magenta: #aa88ff;\\n --color-ansi-red: #ff5555;\\n --color-ansi-yellow: #ffcc33;\\n --color-ansi-bright-white: #ffffff;\\n --color-ansi-bright-black: #777777;\\n --color-ansi-bright-blue: #33bbff;\\n --color-ansi-bright-cyan: #bbecff;\\n --color-ansi-bright-green: #b6f292;\\n --color-ansi-bright-magenta: #cebbff;\\n --color-ansi-bright-red: #ff8888;\\n --color-ansi-bright-yellow: #ffd966;\\n }\\n\\n .mono {\\n font-family: var(--font-stack-monospace);\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-bottom: var(--size-gap);\\n font-weight: 500;\\n line-height: 1.5;\\n }\\n \"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction Base() {\n return /*#__PURE__*/ _react.createElement(\"style\", null, (0, _nooptemplate.noop)(_templateObject()));\n}\n_c = Base;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=Base.js.map\nvar _c;\n$RefreshReg$(_c, \"Base\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9zdHlsZXMvQmFzZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsd0NBQXVDO0lBQ25DSS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CJub29wIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/Base.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js ***! \*******************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"ComponentStyles\", ({\n enumerable: true,\n get: function() {\n return ComponentStyles;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _styles = __webpack_require__(/*! ../components/CodeFrame/styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js\");\nconst _Dialog = __webpack_require__(/*! ../components/Dialog */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js\");\nconst _styles1 = __webpack_require__(/*! ../components/LeftRightDialogHeader/styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js\");\nconst _styles2 = __webpack_require__(/*! ../components/Overlay/styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js\");\nconst _styles3 = __webpack_require__(/*! ../components/Terminal/styles */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js\");\nconst _Toast = __webpack_require__(/*! ../components/Toast */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js\");\nconst _VersionStalenessInfo = __webpack_require__(/*! ../components/VersionStalenessInfo */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js\");\nconst _BuildError = __webpack_require__(/*! ../container/BuildError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js\");\nconst _RootLayoutError = __webpack_require__(/*! ../container/RootLayoutError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RootLayoutError.js\");\nconst _Errors = __webpack_require__(/*! ../container/Errors */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js\");\nconst _RuntimeError = __webpack_require__(/*! ../container/RuntimeError */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/index.js\");\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \",\n \"\\n \"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction ComponentStyles() {\n return /*#__PURE__*/ _react.createElement(\"style\", null, (0, _nooptemplate.noop)(_templateObject(), _styles2.styles, _Toast.styles, _Dialog.styles, _styles1.styles, _styles.styles, _styles3.styles, _BuildError.styles, _RootLayoutError.styles, _Errors.styles, _RuntimeError.styles, _VersionStalenessInfo.styles));\n}\n_c = ComponentStyles;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=ComponentStyles.js.map\nvar _c;\n$RefreshReg$(_c, \"ComponentStyles\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9zdHlsZXMvQ29tcG9uZW50U3R5bGVzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxtREFBa0Q7SUFDOUNJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyw0QkFBNEJDLG1CQUFPQSxDQUFDLDJIQUEwQztBQUNwRixNQUFNQyxpQ0FBaUNELG1CQUFPQSxDQUFDLHFJQUErQztBQUM5RixNQUFNRSxTQUFTLFdBQVcsR0FBR0gsMEJBQTBCSSxDQUFDLENBQUNILG1CQUFPQSxDQUFDLDRFQUFPO0FBQ3hFLE1BQU1JLFVBQVVKLG1CQUFPQSxDQUFDLHlKQUFnQztBQUN4RCxNQUFNSyxVQUFVTCxtQkFBT0EsQ0FBQywySUFBc0I7QUFDOUMsTUFBTU0sV0FBV04sbUJBQU9BLENBQUMsaUxBQTRDO0FBQ3JFLE1BQU1PLFdBQVdQLG1CQUFPQSxDQUFDLHFKQUE4QjtBQUN2RCxNQUFNUSxXQUFXUixtQkFBT0EsQ0FBQyx1SkFBK0I7QUFDeEQsTUFBTVMsU0FBU1QsbUJBQU9BLENBQUMseUlBQXFCO0FBQzVDLE1BQU1VLHdCQUF3QlYsbUJBQU9BLENBQUMsdUtBQW9DO0F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VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/ComponentStyles.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"CssReset\", ({\n enumerable: true,\n get: function() {\n return CssReset;\n }\n}));\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _tagged_template_literal_loose = __webpack_require__(/*! @swc/helpers/_/_tagged_template_literal_loose */ \"(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _nooptemplate = __webpack_require__(/*! ../helpers/noop-template */ \"(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/noop-template.js\");\nfunction _templateObject() {\n const data = _tagged_template_literal_loose._([\n \"\\n :host {\\n all: initial;\\n\\n /* the direction property is not reset by 'all' */\\n direction: ltr;\\n }\\n\\n /*!\\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\\n * Copyright 2011-2019 The Bootstrap Authors\\n * Copyright 2011-2019 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\\n */\\n *,\\n *::before,\\n *::after {\\n box-sizing: border-box;\\n }\\n\\n :host {\\n font-family: sans-serif;\\n line-height: 1.15;\\n -webkit-text-size-adjust: 100%;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n }\\n\\n article,\\n aside,\\n figcaption,\\n figure,\\n footer,\\n header,\\n hgroup,\\n main,\\n nav,\\n section {\\n display: block;\\n }\\n\\n :host {\\n margin: 0;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\\n 'Noto Color Emoji';\\n font-size: 16px;\\n font-weight: 400;\\n line-height: 1.5;\\n color: #212529;\\n text-align: left;\\n background-color: #fff;\\n }\\n\\n [tabindex='-1']:focus:not(:focus-visible) {\\n outline: 0 !important;\\n }\\n\\n hr {\\n box-sizing: content-box;\\n height: 0;\\n overflow: visible;\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-top: 0;\\n margin-bottom: 8px;\\n }\\n\\n p {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n abbr[title],\\n abbr[data-original-title] {\\n text-decoration: underline;\\n -webkit-text-decoration: underline dotted;\\n text-decoration: underline dotted;\\n cursor: help;\\n border-bottom: 0;\\n -webkit-text-decoration-skip-ink: none;\\n text-decoration-skip-ink: none;\\n }\\n\\n address {\\n margin-bottom: 16px;\\n font-style: normal;\\n line-height: inherit;\\n }\\n\\n ol,\\n ul,\\n dl {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n ol ol,\\n ul ul,\\n ol ul,\\n ul ol {\\n margin-bottom: 0;\\n }\\n\\n dt {\\n font-weight: 700;\\n }\\n\\n dd {\\n margin-bottom: 8px;\\n margin-left: 0;\\n }\\n\\n blockquote {\\n margin: 0 0 16px;\\n }\\n\\n b,\\n strong {\\n font-weight: bolder;\\n }\\n\\n small {\\n font-size: 80%;\\n }\\n\\n sub,\\n sup {\\n position: relative;\\n font-size: 75%;\\n line-height: 0;\\n vertical-align: baseline;\\n }\\n\\n sub {\\n bottom: -0.25em;\\n }\\n\\n sup {\\n top: -0.5em;\\n }\\n\\n a {\\n color: #007bff;\\n text-decoration: none;\\n background-color: transparent;\\n }\\n\\n a:hover {\\n color: #0056b3;\\n text-decoration: underline;\\n }\\n\\n a:not([href]) {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n a:not([href]):hover {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n pre,\\n code,\\n kbd,\\n samp {\\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\\n 'Liberation Mono', 'Courier New', monospace;\\n font-size: 1em;\\n }\\n\\n pre {\\n margin-top: 0;\\n margin-bottom: 16px;\\n overflow: auto;\\n }\\n\\n figure {\\n margin: 0 0 16px;\\n }\\n\\n img {\\n vertical-align: middle;\\n border-style: none;\\n }\\n\\n svg {\\n overflow: hidden;\\n vertical-align: middle;\\n }\\n\\n table {\\n border-collapse: collapse;\\n }\\n\\n caption {\\n padding-top: 12px;\\n padding-bottom: 12px;\\n color: #6c757d;\\n text-align: left;\\n caption-side: bottom;\\n }\\n\\n th {\\n text-align: inherit;\\n }\\n\\n label {\\n display: inline-block;\\n margin-bottom: 8px;\\n }\\n\\n button {\\n border-radius: 0;\\n }\\n\\n button:focus {\\n outline: 1px dotted;\\n outline: 5px auto -webkit-focus-ring-color;\\n }\\n\\n input,\\n button,\\n select,\\n optgroup,\\n textarea {\\n margin: 0;\\n font-family: inherit;\\n font-size: inherit;\\n line-height: inherit;\\n }\\n\\n button,\\n input {\\n overflow: visible;\\n }\\n\\n button,\\n select {\\n text-transform: none;\\n }\\n\\n select {\\n word-wrap: normal;\\n }\\n\\n button,\\n [type='button'],\\n [type='reset'],\\n [type='submit'] {\\n -webkit-appearance: button;\\n }\\n\\n button:not(:disabled),\\n [type='button']:not(:disabled),\\n [type='reset']:not(:disabled),\\n [type='submit']:not(:disabled) {\\n cursor: pointer;\\n }\\n\\n button::-moz-focus-inner,\\n [type='button']::-moz-focus-inner,\\n [type='reset']::-moz-focus-inner,\\n [type='submit']::-moz-focus-inner {\\n padding: 0;\\n border-style: none;\\n }\\n\\n input[type='radio'],\\n input[type='checkbox'] {\\n box-sizing: border-box;\\n padding: 0;\\n }\\n\\n input[type='date'],\\n input[type='time'],\\n input[type='datetime-local'],\\n input[type='month'] {\\n -webkit-appearance: listbox;\\n }\\n\\n textarea {\\n overflow: auto;\\n resize: vertical;\\n }\\n\\n fieldset {\\n min-width: 0;\\n padding: 0;\\n margin: 0;\\n border: 0;\\n }\\n\\n legend {\\n display: block;\\n width: 100%;\\n max-width: 100%;\\n padding: 0;\\n margin-bottom: 8px;\\n font-size: 24px;\\n line-height: inherit;\\n color: inherit;\\n white-space: normal;\\n }\\n\\n progress {\\n vertical-align: baseline;\\n }\\n\\n [type='number']::-webkit-inner-spin-button,\\n [type='number']::-webkit-outer-spin-button {\\n height: auto;\\n }\\n\\n [type='search'] {\\n outline-offset: -2px;\\n -webkit-appearance: none;\\n }\\n\\n [type='search']::-webkit-search-decoration {\\n -webkit-appearance: none;\\n }\\n\\n ::-webkit-file-upload-button {\\n font: inherit;\\n -webkit-appearance: button;\\n }\\n\\n output {\\n display: inline-block;\\n }\\n\\n summary {\\n display: list-item;\\n cursor: pointer;\\n }\\n\\n template {\\n display: none;\\n }\\n\\n [hidden] {\\n display: none !important;\\n }\\n \"\n ]);\n _templateObject = function() {\n return data;\n };\n return data;\n}\nfunction CssReset() {\n return /*#__PURE__*/ _react.createElement(\"style\", null, (0, _nooptemplate.noop)(_templateObject()));\n}\n_c = CssReset;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=CssReset.js.map\nvar _c;\n$RefreshReg$(_c, \"CssReset\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9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laWdodDogMS4xNTtcXG4gICAgICAgICAgLXdlYmtpdC10ZXh0LXNpemUtYWRqdXN0OiAxMDAlO1xcbiAgICAgICAgICAtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMCk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhcnRpY2xlLFxcbiAgICAgICAgYXNpZGUsXFxuICAgICAgICBmaWdjYXB0aW9uLFxcbiAgICAgICAgZmlndXJlLFxcbiAgICAgICAgZm9vdGVyLFxcbiAgICAgICAgaGVhZGVyLFxcbiAgICAgICAgaGdyb3VwLFxcbiAgICAgICAgbWFpbixcXG4gICAgICAgIG5hdixcXG4gICAgICAgIHNlY3Rpb24ge1xcbiAgICAgICAgICBkaXNwbGF5OiBibG9jaztcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIDpob3N0IHtcXG4gICAgICAgICAgbWFyZ2luOiAwO1xcbiAgICAgICAgICBmb250LWZhbWlseTogLWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAnU2Vnb2UgVUknLCBSb2JvdG8sXFxuICAgICAgICAgICAgJ0hlbHZldGljYSBOZXVlJywgQXJpYWwsICdOb3RvIFNhbnMnLCBzYW5zLXNlcmlmLFxcbiAgICAgICAgICAgICdBcHBsZSBDb2xvciBFbW9qaScsICdTZWdvZSBVSSBFbW9qaScsICdTZWdvZSBVSSBTeW1ib2wnLFxcbiAgICAgICAgICAgICdOb3RvIENvbG9yIEVtb2ppJztcXG4gICAgICAgICAgZm9udC1zaXplOiAxNnB4O1xcbiAgICAgICAgICBmb250LXdlaWdodDogNDAwO1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogMS41O1xcbiAgICAgICAgICBjb2xvcjogIzIxMjUyOTtcXG4gICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIFt0YWJpbmRleD0nLTEnXTpmb2N1czpub3QoOmZvY3VzLXZpc2libGUpIHtcXG4gICAgICAgICAgb3V0bGluZTogMCAhaW1wb3J0YW50O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaHIge1xcbiAgICAgICAgICBib3gtc2l6aW5nOiBjb250ZW50LWJveDtcXG4gICAgICAgICAgaGVpZ2h0OiAwO1xcbiAgICAgICAgICBvdmVyZmxvdzogdmlzaWJsZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGgxLFxcbiAgICAgICAgaDIsXFxuICAgICAgICBoMyxcXG4gICAgICAgIGg0LFxcbiAgICAgICAgaDUsXFxuICAgICAgICBoNiB7XFxuICAgICAgICAgIG1hcmdpbi10b3A6IDA7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDhweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHAge1xcbiAgICAgICAgICBtYXJnaW4tdG9wOiAwO1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxNnB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYWJiclt0aXRsZV0sXFxuICAgICAgICBhYmJyW2RhdGEtb3JpZ2luYWwtdGl0bGVdIHtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7XFxuICAgICAgICAgIC13ZWJraXQtdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZSBkb3R0ZWQ7XFxuICAgICAgICAgIGN1cnNvcjogaGVscDtcXG4gICAgICAgICAgYm9yZGVyLWJvdHRvbTogMDtcXG4gICAgICAgICAgLXdlYmtpdC10ZXh0LWRlY29yYXRpb24tc2tpcC1pbms6IG5vbmU7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbi1za2lwLWluazogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGFkZHJlc3Mge1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxNnB4O1xcbiAgICAgICAgICBmb250LXN0eWxlOiBub3JtYWw7XFxuICAgICAgICAgIGxpbmUtaGVpZ2h0OiBpbmhlcml0O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgb2wsXFxuICAgICAgICB1bCxcXG4gICAgICAgIGRsIHtcXG4gICAgICAgICAgbWFyZ2luLXRvcDogMDtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTZweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIG9sIG9sLFxcbiAgICAgICAgdWwgdWwsXFxuICAgICAgICBvbCB1bCxcXG4gICAgICAgIHVsIG9sIHtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogMDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGR0IHtcXG4gICAgICAgICAgZm9udC13ZWlnaHQ6IDcwMDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGRkIHtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogOHB4O1xcbiAgICAgICAgICBtYXJnaW4tbGVmdDogMDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJsb2NrcXVvdGUge1xcbiAgICAgICAgICBtYXJnaW46IDAgMCAxNnB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYixcXG4gICAgICAgIHN0cm9uZyB7XFxuICAgICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkZXI7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzbWFsbCB7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogODAlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc3ViLFxcbiAgICAgICAgc3VwIHtcXG4gICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xcbiAgICAgICAgICBmb250LXNpemU6IDc1JTtcXG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDA7XFxuICAgICAgICAgIHZlcnRpY2FsLWFsaWduOiBiYXNlbGluZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHN1YiB7XFxuICAgICAgICAgIGJvdHRvbTogLTAuMjVlbTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHN1cCB7XFxuICAgICAgICAgIHRvcDogLTAuNWVtO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYSB7XFxuICAgICAgICAgIGNvbG9yOiAjMDA3YmZmO1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XFxuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYTpob3ZlciB7XFxuICAgICAgICAgIGNvbG9yOiAjMDA1NmIzO1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGE6bm90KFtocmVmXSkge1xcbiAgICAgICAgICBjb2xvcjogaW5oZXJpdDtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYTpub3QoW2hyZWZdKTpob3ZlciB7XFxuICAgICAgICAgIGNvbG9yOiBpbmhlcml0O1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBwcmUsXFxuICAgICAgICBjb2RlLFxcbiAgICAgICAga2JkLFxcbiAgICAgICAgc2FtcCB7XFxuICAgICAgICAgIGZvbnQtZmFtaWx5OiBTRk1vbm8tUmVndWxhciwgTWVubG8sIE1vbmFjbywgQ29uc29sYXMsXFxuICAgICAgICAgICAgJ0xpYmVyYXRpb24gTW9ubycsICdDb3VyaWVyIE5ldycsIG1vbm9zcGFjZTtcXG4gICAgICAgICAgZm9udC1zaXplOiAxZW07XFxuICAgICAgICB9XFxuXFxuICAgICAgICBwcmUge1xcbiAgICAgICAgICBtYXJnaW4tdG9wOiAwO1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxNnB4O1xcbiAgICAgICAgICBvdmVyZmxvdzogYXV0bztcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGZpZ3VyZSB7XFxuICAgICAgICAgIG1hcmdpbjogMCAwIDE2cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbWcge1xcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcbiAgICAgICAgICBib3JkZXItc3R5bGU6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzdmcge1xcbiAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgdGFibGUge1xcbiAgICAgICAgICBib3JkZXItY29sbGFwc2U6IGNvbGxhcHNlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgY2FwdGlvbiB7XFxuICAgICAgICAgIHBhZGRpbmctdG9wOiAxMnB4O1xcbiAgICAgICAgICBwYWRkaW5nLWJvdHRvbTogMTJweDtcXG4gICAgICAgICAgY29sb3I6ICM2Yzc1N2Q7XFxuICAgICAgICAgIHRleHQtYWxpZ246IGxlZnQ7XFxuICAgICAgICAgIGNhcHRpb24tc2lkZTogYm90dG9tO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgdGgge1xcbiAgICAgICAgICB0ZXh0LWFsaWduOiBpbmhlcml0O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGFiZWwge1xcbiAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDhweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbiB7XFxuICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b246Zm9jdXMge1xcbiAgICAgICAgICBvdXRsaW5lOiAxcHggZG90dGVkO1xcbiAgICAgICAgICBvdXRsaW5lOiA1cHggYXV0byAtd2Via2l0LWZvY3VzLXJpbmctY29sb3I7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCxcXG4gICAgICAgIGJ1dHRvbixcXG4gICAgICAgIHNlbGVjdCxcXG4gICAgICAgIG9wdGdyb3VwLFxcbiAgICAgICAgdGV4dGFyZWEge1xcbiAgICAgICAgICBtYXJnaW46IDA7XFxuICAgICAgICAgIGZvbnQtZmFtaWx5OiBpbmhlcml0O1xcbiAgICAgICAgICBmb250LXNpemU6IGluaGVyaXQ7XFxuICAgICAgICAgIGxpbmUtaGVpZ2h0OiBpbmhlcml0O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uLFxcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICBvdmVyZmxvdzogdmlzaWJsZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbixcXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgIHRleHQtdHJhbnNmb3JtOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgd29yZC13cmFwOiBub3JtYWw7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b24sXFxuICAgICAgICBbdHlwZT0nYnV0dG9uJ10sXFxuICAgICAgICBbdHlwZT0ncmVzZXQnXSxcXG4gICAgICAgIFt0eXBlPSdzdWJtaXQnXSB7XFxuICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogYnV0dG9uO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uOm5vdCg6ZGlzYWJsZWQpLFxcbiAgICAgICAgW3R5cGU9J2J1dHRvbiddOm5vdCg6ZGlzYWJsZWQpLFxcbiAgICAgICAgW3R5cGU9J3Jlc2V0J106bm90KDpkaXNhYmxlZCksXFxuICAgICAgICBbdHlwZT0nc3VibWl0J106bm90KDpkaXNhYmxlZCkge1xcbiAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b246Oi1tb3otZm9jdXMtaW5uZXIsXFxuICAgICAgICBbdHlwZT0nYnV0dG9uJ106Oi1tb3otZm9jdXMtaW5uZXIsXFxuICAgICAgICBbdHlwZT0ncmVzZXQnXTo6LW1vei1mb2N1cy1pbm5lcixcXG4gICAgICAgIFt0eXBlPSdzdWJtaXQnXTo6LW1vei1mb2N1cy1pbm5lciB7XFxuICAgICAgICAgIHBhZGRpbmc6IDA7XFxuICAgICAgICAgIGJvcmRlci1zdHlsZTogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGlucHV0W3R5cGU9J3JhZGlvJ10sXFxuICAgICAgICBpbnB1dFt0eXBlPSdjaGVja2JveCddIHtcXG4gICAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcXG4gICAgICAgICAgcGFkZGluZzogMDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGlucHV0W3R5cGU9J2RhdGUnXSxcXG4gICAgICAgIGlucHV0W3R5cGU9J3RpbWUnXSxcXG4gICAgICAgIGlucHV0W3R5cGU9J2RhdGV0aW1lLWxvY2FsJ10sXFxuICAgICAgICBpbnB1dFt0eXBlPSdtb250aCddIHtcXG4gICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBsaXN0Ym94O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgdGV4dGFyZWEge1xcbiAgICAgICAgICBvdmVyZmxvdzogYXV0bztcXG4gICAgICAgICAgcmVzaXplOiB2ZXJ0aWNhbDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGZpZWxkc2V0IHtcXG4gICAgICAgICAgbWluLXdpZHRoOiAwO1xcbiAgICAgICAgICBwYWRkaW5nOiAwO1xcbiAgICAgICAgICBtYXJnaW46IDA7XFxuICAgICAgICAgIGJvcmRlcjogMDtcXG4gICAgICAgIH1cXG5cXG4gIC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ihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Q3NzUmVzZXQuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsIkNzc1Jlc2V0IiwiX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZCIsInJlcXVpcmUiLCJfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2UiLCJfcmVhY3QiLCJfIiwiX25vb3B0ZW1wbGF0ZSIsIl90ZW1wbGF0ZU9iamVjdCIsImRhdGEiLCJjcmVhdGVFbGVtZW50Iiwibm9vcCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/react-dev-overlay/internal/styles/CssReset.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js": /*!***********************************************************************!*\ !*** ./node_modules/next/dist/client/components/redirect-boundary.js ***! \***********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n RedirectErrorBoundary: function() {\n return RedirectErrorBoundary;\n },\n RedirectBoundary: function() {\n return RedirectBoundary;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _navigation = __webpack_require__(/*! ./navigation */ \"(app-client)/./node_modules/next/dist/client/components/navigation.js\");\nconst _redirect = __webpack_require__(/*! ./redirect */ \"(app-client)/./node_modules/next/dist/client/components/redirect.js\");\nfunction HandleRedirect(param) {\n let { redirect, reset, redirectType } = param;\n const router = (0, _navigation.useRouter)();\n (0, _react.useEffect)(()=>{\n // @ts-ignore startTransition exists\n _react.default.startTransition(()=>{\n if (redirectType === _redirect.RedirectType.push) {\n router.push(redirect, {});\n } else {\n router.replace(redirect, {});\n }\n reset();\n });\n }, [\n redirect,\n redirectType,\n reset,\n router\n ]);\n return null;\n}\n_c = HandleRedirect;\nclass RedirectErrorBoundary extends _react.default.Component {\n static getDerivedStateFromError(error) {\n if ((0, _redirect.isRedirectError)(error)) {\n const url = (0, _redirect.getURLFromRedirectError)(error);\n const redirectType = (0, _redirect.getRedirectTypeFromError)(error);\n return {\n redirect: url,\n redirectType\n };\n }\n // Re-throw if error is not for redirect\n throw error;\n }\n render() {\n const { redirect, redirectType } = this.state;\n if (redirect !== null && redirectType !== null) {\n return /*#__PURE__*/ _react.default.createElement(HandleRedirect, {\n redirect: redirect,\n redirectType: redirectType,\n reset: ()=>this.setState({\n redirect: null\n })\n });\n }\n return this.props.children;\n }\n constructor(props){\n super(props);\n this.state = {\n redirect: null,\n redirectType: null\n };\n }\n}\nfunction RedirectBoundary(param) {\n let { children } = param;\n const router = (0, _navigation.useRouter)();\n return /*#__PURE__*/ _react.default.createElement(RedirectErrorBoundary, {\n router: router\n }, children);\n}\n_c1 = RedirectBoundary;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=redirect-boundary.js.map\nvar _c, _c1;\n$RefreshReg$(_c, \"HandleRedirect\");\n$RefreshReg$(_c1, \"RedirectBoundary\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n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Jyb3IpKGVycm9yKTtcbiAgICAgICAgICAgIGNvbnN0IHJlZGlyZWN0VHlwZSA9ICgwLCBfcmVkaXJlY3QuZ2V0UmVkaXJlY3RUeXBlRnJvbUVycm9yKShlcnJvcik7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHJlZGlyZWN0OiB1cmwsXG4gICAgICAgICAgICAgICAgcmVkaXJlY3RUeXBlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIC8vIFJlLXRocm93IGlmIGVycm9yIGlzIG5vdCBmb3IgcmVkaXJlY3RcbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgfVxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3QgeyByZWRpcmVjdCAsIHJlZGlyZWN0VHlwZSAgfSA9IHRoaXMuc3RhdGU7XG4gICAgICAgIGlmIChyZWRpcmVjdCAhPT0gbnVsbCAmJiByZWRpcmVjdFR5cGUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiAvKiNfX1BVUkVfXyovIF9yZWFjdC5kZWZhdWx0LmNyZWF0ZUVsZW1lbnQoSGFuZGxlUmVkaXJlY3QsIHtcbiAgICAgICAgICAgICAgICByZWRpcmVjdDogcmVkaXJlY3QsXG4gICAgICAgICAgICAgICAgcmVkaXJlY3RUeXBlOiByZWRpcmVjdFR5cGUsXG4gICAgICAgICAgICAgICAgcmVzZXQ6ICgpPT50aGlzLnNldFN0YXRlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBudWxsXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5jaGlsZHJlbjtcbiAgICB9XG4gICAgY29uc3RydWN0b3IocHJvcHMpe1xuICAgICAgICBzdXBlcihwcm9wcyk7XG4gICAgICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICAgICAgICByZWRpcm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wb3J0IiwidGFyZ2V0IiwiYWxsIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJfaW50ZXJvcF9yZXF1aXJlX3dpbGRjYXJkIiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJfbmF2aWdhdGlvbiIsIl9yZWRpcmVjdCIsIkhhbmRsZVJlZGlyZWN0IiwicGFyYW0iLCJyZWRpcmVjdCIsInJlc2V0IiwicmVkaXJlY3RUeXBlIiwicm91dGVyIiwidXNlUm91dGVyIiwidXNlRWZmZWN0IiwiZGVmYXVsdCIsInN0YXJ0VHJhbnNpdGlvbiIsIlJlZGlyZWN0VHlwZSIsInB1c2giLCJyZXBsYWNlIiwiQ29tcG9uZW50IiwiZ2V0RGVyaXZlZFN0YXRlRnJvbUVycm9yIiwiZXJyb3IiLCJpc1JlZGlyZWN0RXJyb3IiLCJ1cmwiLCJnZXRVUkxGcm9tUmVkaXJlY3RFcnJvciIsImdldFJlZGlyZWN0VHlwZUZyb21FcnJvciIsInJlbmRlciIsInN0YXRlIiwiY3JlYXRlRWxlbWVudCIsInNldFN0YXRlIiwicHJvcHMiLCJjaGlsZHJlbiIsImNvbnN0cnVjdG9yIiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect-boundary.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/redirect.js": /*!**************************************************************!*\ !*** ./node_modules/next/dist/client/components/redirect.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n RedirectType: function() {\n return RedirectType;\n },\n getRedirectError: function() {\n return getRedirectError;\n },\n redirect: function() {\n return redirect;\n },\n isRedirectError: function() {\n return isRedirectError;\n },\n getURLFromRedirectError: function() {\n return getURLFromRedirectError;\n },\n getRedirectTypeFromError: function() {\n return getRedirectTypeFromError;\n }\n});\nconst _requestasyncstorage = __webpack_require__(/*! ./request-async-storage */ \"(sc_shared)/./node_modules/next/dist/client/components/request-async-storage.js\");\nconst REDIRECT_ERROR_CODE = \"NEXT_REDIRECT\";\nvar RedirectType;\n(function(RedirectType) {\n RedirectType[\"push\"] = \"push\";\n RedirectType[\"replace\"] = \"replace\";\n})(RedirectType || (RedirectType = {}));\nfunction getRedirectError(url, type) {\n const error = new Error(REDIRECT_ERROR_CODE);\n error.digest = REDIRECT_ERROR_CODE + \";\" + type + \";\" + url;\n const requestStore = _requestasyncstorage.requestAsyncStorage.getStore();\n if (requestStore) {\n error.mutableCookies = requestStore.mutableCookies;\n }\n return error;\n}\nfunction redirect(url, type) {\n if (type === void 0) type = \"replace\";\n throw getRedirectError(url, type);\n}\nfunction isRedirectError(error) {\n if (typeof (error == null ? void 0 : error.digest) !== \"string\") return false;\n const [errorCode, type, destination] = error.digest.split(\";\", 3);\n return errorCode === REDIRECT_ERROR_CODE && (type === \"replace\" || type === \"push\") && typeof destination === \"string\";\n}\nfunction getURLFromRedirectError(error) {\n if (!isRedirectError(error)) return null;\n // Slices off the beginning of the digest that contains the code and the\n // separating ';'.\n return error.digest.split(\";\", 3)[2];\n}\nfunction getRedirectTypeFromError(error) {\n if (!isRedirectError(error)) {\n throw new Error(\"Not a redirect error\");\n }\n return error.digest.split(\";\", 3)[1];\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=redirect.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9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BvcnRzIiwidmFsdWUiLCJtb2R1bGUiLCJSZWRpcmVjdFR5cGUiLCJnZXRSZWRpcmVjdEVycm9yIiwicmVkaXJlY3QiLCJpc1JlZGlyZWN0RXJyb3IiLCJnZXRVUkxGcm9tUmVkaXJlY3RFcnJvciIsImdldFJlZGlyZWN0VHlwZUZyb21FcnJvciIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9yZXF1ZXN0YXN5bmNzdG9yYWdlIiwicmVxdWlyZSIsIlJFRElSRUNUX0VSUk9SX0NPREUiLCJ1cmwiLCJ0eXBlIiwiZXJyb3IiLCJFcnJvciIsImRpZ2VzdCIsInJlcXVlc3RTdG9yZSIsInJlcXVlc3RBc3luY1N0b3JhZ2UiLCJnZXRTdG9yZSIsIm11dGFibGVDb29raWVzIiwiZXJyb3JDb2RlIiwiZGVzdGluYXRpb24iLCJzcGxpdCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/redirect.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js": /*!**************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js ***! \**************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"applyFlightData\", ({\n enumerable: true,\n get: function() {\n return applyFlightData;\n }\n}));\nconst _approutercontext = __webpack_require__(/*! ../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _filllazyitemstillleafwithhead = __webpack_require__(/*! ./fill-lazy-items-till-leaf-with-head */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js\");\nconst _fillcachewithnewsubtreedata = __webpack_require__(/*! ./fill-cache-with-new-subtree-data */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js\");\nfunction applyFlightData(existingCache, cache, flightDataPath, wasPrefetched) {\n if (wasPrefetched === void 0) wasPrefetched = false;\n // The one before last item is the router state tree patch\n const [treePatch, subTreeData, head] = flightDataPath.slice(-3);\n // Handles case where prefetch only returns the router tree patch without rendered components.\n if (subTreeData === null) {\n return false;\n }\n if (flightDataPath.length === 3) {\n cache.status = _approutercontext.CacheStates.READY;\n cache.subTreeData = subTreeData;\n (0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(cache, existingCache, treePatch, head, wasPrefetched);\n } else {\n // Copy subTreeData for the root node of the cache.\n cache.status = _approutercontext.CacheStates.READY;\n cache.subTreeData = existingCache.subTreeData;\n cache.parallelRoutes = new Map(existingCache.parallelRoutes);\n // Create a copy of the existing cache with the subTreeData applied.\n (0, _fillcachewithnewsubtreedata.fillCacheWithNewSubTreeData)(cache, existingCache, flightDataPath, wasPrefetched);\n }\n return true;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=apply-flight-data.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9hcHBseS1mbGlnaHQtZGF0YS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsbURBQWtEO0lBQzlDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUN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PSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFwcGx5LWZsaWdodC1kYXRhLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJhcHBseUZsaWdodERhdGEiLCJfYXBwcm91dGVyY29udGV4dCIsInJlcXVpcmUiLCJfZmlsbGxhenlpdGVtc3RpbGxsZWFmd2l0aGhlYWQiLCJfZmlsbGNhY2hld2l0aG5ld3N1YnRyZWVkYXRhIiwiZXhpc3RpbmdDYWNoZSIsImNhY2hlIiwiZmxpZ2h0RGF0YVBhdGgiLCJ3YXNQcmVmZXRjaGVkIiwidHJlZVBhdGNoIiwic3ViVHJlZURhdGEiLCJoZWFkIiwic2xpY2UiLCJsZW5ndGgiLCJzdGF0dXMiLCJDYWNoZVN0YXRlcyIsIlJFQURZIiwiZmlsbExhenlJdGVtc1RpbGxMZWFmV2l0aEhlYWQiLCJwYXJhbGxlbFJvdXRlcyIsIk1hcCIsImZpbGxDYWNoZVdpdGhOZXdTdWJUcmVlRGF0YSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js ***! \*****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"applyRouterStatePatchToTree\", ({\n enumerable: true,\n get: function() {\n return applyRouterStatePatchToTree;\n }\n}));\nconst _matchsegments = __webpack_require__(/*! ../match-segments */ \"(app-client)/./node_modules/next/dist/client/components/match-segments.js\");\n/**\n * Deep merge of the two router states. Parallel route keys are preserved if the patch doesn't have them.\n */ function applyPatch(initialTree, patchTree) {\n const [initialSegment, initialParallelRoutes] = initialTree;\n const [patchSegment, patchParallelRoutes] = patchTree;\n // if the applied patch segment is __DEFAULT__ then we can ignore it and return the initial tree\n // this is because the __DEFAULT__ segment is used as a placeholder on navigation\n if (patchSegment === \"__DEFAULT__\" && initialSegment !== \"__DEFAULT__\") {\n return initialTree;\n }\n if ((0, _matchsegments.matchSegment)(initialSegment, patchSegment)) {\n const newParallelRoutes = {};\n for(const key in initialParallelRoutes){\n const isInPatchTreeParallelRoutes = typeof patchParallelRoutes[key] !== \"undefined\";\n if (isInPatchTreeParallelRoutes) {\n newParallelRoutes[key] = applyPatch(initialParallelRoutes[key], patchParallelRoutes[key]);\n } else {\n newParallelRoutes[key] = initialParallelRoutes[key];\n }\n }\n for(const key in patchParallelRoutes){\n if (newParallelRoutes[key]) {\n continue;\n }\n newParallelRoutes[key] = patchParallelRoutes[key];\n }\n const tree = [\n initialSegment,\n newParallelRoutes\n ];\n if (initialTree[2]) {\n tree[2] = initialTree[2];\n }\n if (initialTree[3]) {\n tree[3] = initialTree[3];\n }\n if (initialTree[4]) {\n tree[4] = initialTree[4];\n }\n return tree;\n }\n return patchTree;\n}\nfunction applyRouterStatePatchToTree(flightSegmentPath, flightRouterState, treePatch) {\n const [segment, parallelRoutes, , , isRootLayout] = flightRouterState;\n // Root refresh\n if (flightSegmentPath.length === 1) {\n const tree = applyPatch(flightRouterState, treePatch);\n return tree;\n }\n const [currentSegment, parallelRouteKey] = flightSegmentPath;\n // Tree path returned from the server should always match up with the current tree in the browser\n if (!(0, _matchsegments.matchSegment)(currentSegment, segment)) {\n return null;\n }\n const lastSegment = flightSegmentPath.length === 2;\n let parallelRoutePatch;\n if (lastSegment) {\n parallelRoutePatch = applyPatch(parallelRoutes[parallelRouteKey], treePatch);\n } else {\n parallelRoutePatch = applyRouterStatePatchToTree(flightSegmentPath.slice(2), parallelRoutes[parallelRouteKey], treePatch);\n if (parallelRoutePatch === null) {\n return null;\n }\n }\n const tree = [\n flightSegmentPath[0],\n {\n ...parallelRoutes,\n [parallelRouteKey]: parallelRoutePatch\n }\n ];\n // Current segment is the root layout\n if (isRootLayout) {\n tree[4] = true;\n }\n return tree;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=apply-router-state-patch-to-tree.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9hcHBseS1yb3V0ZXItc3RhdGUtcGF0Y2gtdG8tdHJlZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsK0RBQThEO0lBQzFESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsaUJBQWlCQyxtQkFBT0EsQ0FBQyxvR0FBbUI7QUFDbEQ7O0NBRUMsR0FBRyxTQUFTQyxXQUFXQyxXQUFXLEVBQUVDLFNBQVM7SUFDMUMsTUFBTSxDQUFDQyxnQkFBZ0JDLHNCQUFzQixHQUFHSDtJQUNoRCxNQUFNLENBQUNJLGNBQWNDLG9CQUFvQixHQUFHSjtJQUM1QyxnR0FBZ0c7SUFDaEcsaUZBQWlGO0lBQ2pGLElBQUlHLGlCQUFpQixpQkFBaUJGLG1CQUFtQixlQUFlO1FBQ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91dGVzKSB7XG4gICAgICAgICAgICAgICAgbmV3UGFyYWxsZWxSb3V0ZXNba2V5XSA9IGFwcGx5UGF0Y2goaW5pdGlhbFBhcmFsbGVsUm91dGVzW2tleV0sIHBhdGNoUGFyYWxsZWxSb3V0ZXNba2V5XSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld1BhcmFsbGVsUm91dGVzW2tleV0gPSBpbml0aWFsUGFyYWxsZWxSb3V0ZXNba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmb3IoY29uc3Qga2V5IGluIHBhdGNoUGFyYWxsZWxSb3V0ZXMpe1xuICAgICAgICAgICAgaWYgKG5ld1BhcmFsbGVsUm91dGVzW2tleV0pIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG5ld1BhcmFsbGVsUm91dGVzW2tleV0gPSBwYXRjaFBhcmFsbGVsUm91dGVzW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdHJlZSA9IFtcbiAgICAgICAgICAgIGluaXRpYWxTZWdtZW50LFxuICAgICAgICAgICAgbmV3UGFyYWxsZWxSb3V0ZXNcbiAgICAgICAgXTtcbiAgICAgICAgaWYgKGluaXRpYWxUcmVlWzJdKSB7XG4gICAgICAgICAgICB0cmVlWzJdID0gaW5pdGlhbFRyZWVbMl07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGluaXRpYWxUcmVlWzNdKSB7XG4gICAgICAgICAgICB0cmVlWzNdID0gaW5pdGlhbFRyZWVbM107XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGluaXRpYWxUcmVlWzRdKSB7XG4gICAgICAgICAgICB0cmVlWzRdID0gaW5pdGlhbFRyZWVbNF07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRyZWU7XG4gICAgfVxuICAgIHJldHVybiBwYXRjaFRyZWU7XG59XG5mdW5jdGlvbiBhcHB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uXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hcHBseS1yb3V0ZXItc3RhdGUtcGF0Y2gtdG8tdHJlZS5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiYXBwbHlSb3V0ZXJTdGF0ZVBhdGNoVG9UcmVlIiwiX21hdGNoc2VnbWVudHMiLCJyZXF1aXJlIiwiYXBwbHlQYXRjaCIsImluaXRpYWxUcmVlIiwicGF0Y2hUcmVlIiwiaW5pdGlhbFNlZ21lbnQiLCJpbml0aWFsUGFyYWxsZWxSb3V0ZXMiLCJwYXRjaFNlZ21lbnQiLCJwYXRjaFBhcmFsbGVsUm91dGVzIiwibWF0Y2hTZWdtZW50IiwibmV3UGFyYWxsZWxSb3V0ZXMiLCJrZXkiLCJpc0luUGF0Y2hUcmVlUGFyYWxsZWxSb3V0ZXMiLCJ0cmVlIiwiZmxpZ2h0U2VnbWVudFBhdGgiLCJmbGlnaHRSb3V0ZXJTdGF0ZSIsInRyZWVQYXRjaCIsInNlZ21lbnQiLCJwYXJhbGxlbFJvdXRlcyIsImlzUm9vdExheW91dCIsImxlbmd0aCIsImN1cnJlbnRTZWdtZW50IiwicGFyYWxsZWxSb3V0ZUtleSIsImxhc3RTZWdtZW50IiwicGFyYWxsZWxSb3V0ZVBhdGNoIiwic2xpY2UiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/compute-changed-path.js": /*!*****************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/compute-changed-path.js ***! \*****************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n extractPathFromFlightRouterState: function() {\n return extractPathFromFlightRouterState;\n },\n computeChangedPath: function() {\n return computeChangedPath;\n }\n});\nconst _interceptionroutes = __webpack_require__(/*! ../../../server/future/helpers/interception-routes */ \"(app-client)/./node_modules/next/dist/server/future/helpers/interception-routes.js\");\nconst _matchsegments = __webpack_require__(/*! ../match-segments */ \"(app-client)/./node_modules/next/dist/client/components/match-segments.js\");\nconst segmentToPathname = (segment)=>{\n if (typeof segment === \"string\") {\n return segment;\n }\n return segment[1];\n};\nfunction normalizePathname(pathname) {\n return pathname.split(\"/\").reduce((acc, segment)=>{\n if (segment === \"\" || segment.startsWith(\"(\") && segment.endsWith(\")\")) {\n return acc;\n }\n return acc + \"/\" + segment;\n }, \"\") || \"/\";\n}\nfunction extractPathFromFlightRouterState(flightRouterState) {\n const segment = Array.isArray(flightRouterState[0]) ? flightRouterState[0][1] : flightRouterState[0];\n if (segment === \"__DEFAULT__\" || _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m))) return undefined;\n if (segment.startsWith(\"__PAGE__\")) return \"\";\n const path = [\n segment\n ];\n var _flightRouterState_;\n const parallelRoutes = (_flightRouterState_ = flightRouterState[1]) != null ? _flightRouterState_ : {};\n const childrenPath = parallelRoutes.children ? extractPathFromFlightRouterState(parallelRoutes.children) : undefined;\n if (childrenPath !== undefined) {\n path.push(childrenPath);\n } else {\n for (const [key, value] of Object.entries(parallelRoutes)){\n if (key === \"children\") continue;\n const childPath = extractPathFromFlightRouterState(value);\n if (childPath !== undefined) {\n path.push(childPath);\n }\n }\n }\n // TODO-APP: optimise this, it's not ideal to join and split\n return normalizePathname(path.join(\"/\"));\n}\nfunction computeChangedPathImpl(treeA, treeB) {\n const [segmentA, parallelRoutesA] = treeA;\n const [segmentB, parallelRoutesB] = treeB;\n const normalizedSegmentA = segmentToPathname(segmentA);\n const normalizedSegmentB = segmentToPathname(segmentB);\n if (_interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m))) {\n return \"\";\n }\n if (!(0, _matchsegments.matchSegment)(segmentA, segmentB)) {\n var _extractPathFromFlightRouterState;\n // once we find where the tree changed, we compute the rest of the path by traversing the tree\n return (_extractPathFromFlightRouterState = extractPathFromFlightRouterState(treeB)) != null ? _extractPathFromFlightRouterState : \"\";\n }\n for(const parallelRouterKey in parallelRoutesA){\n if (parallelRoutesB[parallelRouterKey]) {\n const changedPath = computeChangedPathImpl(parallelRoutesA[parallelRouterKey], parallelRoutesB[parallelRouterKey]);\n if (changedPath !== null) {\n return segmentToPathname(segmentB) + \"/\" + changedPath;\n }\n }\n }\n return null;\n}\nfunction computeChangedPath(treeA, treeB) {\n const changedPath = computeChangedPathImpl(treeA, treeB);\n if (changedPath == null || changedPath === \"/\") {\n return changedPath;\n }\n // lightweight normalization to remove route groups\n return normalizePathname(changedPath);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=compute-changed-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9jb21wdXRlLWNoYW5nZWQtcGF0aC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUdOO0FBQ0EsU0FB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ST1VURV9NQVJLRVJTIiwic29tZSIsIm0iLCJ1bmRlZmluZWQiLCJwYXRoIiwiX2ZsaWdodFJvdXRlclN0YXRlXyIsInBhcmFsbGVsUm91dGVzIiwiY2hpbGRyZW5QYXRoIiwiY2hpbGRyZW4iLCJwdXNoIiwia2V5IiwiZW50cmllcyIsImNoaWxkUGF0aCIsImpvaW4iLCJjb21wdXRlQ2hhbmdlZFBhdGhJbXBsIiwidHJlZUEiLCJ0cmVlQiIsInNlZ21lbnRBIiwicGFyYWxsZWxSb3V0ZXNBIiwic2VnbWVudEIiLCJwYXJhbGxlbFJvdXRlc0IiLCJub3JtYWxpemVkU2VnbWVudEEiLCJub3JtYWxpemVkU2VnbWVudEIiLCJtYXRjaFNlZ21lbnQiLCJfZXh0cmFjdFBhdGhGcm9tRmxpZ2h0Um91dGVyU3RhdGUiLCJwYXJhbGxlbFJvdXRlcktleSIsImNoYW5nZWRQYXRoIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/compute-changed-path.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js": /*!*****************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js ***! \*****************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createHrefFromUrl\", ({\n enumerable: true,\n get: function() {\n return createHrefFromUrl;\n }\n}));\nfunction createHrefFromUrl(url, includeHash) {\n if (includeHash === void 0) includeHash = true;\n return url.pathname + url.search + (includeHash ? url.hash : \"\");\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=create-href-from-url.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerAB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O1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y3JlYXRlLWhyZWYtZnJvbS11cmwuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsImNyZWF0ZUhyZWZGcm9tVXJsIiwidXJsIiwiaW5jbHVkZUhhc2giLCJwYXRobmFtZSIsInNlYXJjaCIsImhhc2giLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createInitialRouterState\", ({\n enumerable: true,\n get: function() {\n return createInitialRouterState;\n }\n}));\nconst _approutercontext = __webpack_require__(/*! ../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _createhreffromurl = __webpack_require__(/*! ./create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _filllazyitemstillleafwithhead = __webpack_require__(/*! ./fill-lazy-items-till-leaf-with-head */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js\");\nconst _computechangedpath = __webpack_require__(/*! ./compute-changed-path */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/compute-changed-path.js\");\nfunction createInitialRouterState(param) {\n let { buildId, initialTree, children, initialCanonicalUrl, initialParallelRoutes, isServer, location, initialHead } = param;\n const cache = {\n status: _approutercontext.CacheStates.READY,\n data: null,\n subTreeData: children,\n // The cache gets seeded during the first render. `initialParallelRoutes` ensures the cache from the first render is there during the second render.\n parallelRoutes: isServer ? new Map() : initialParallelRoutes\n };\n // When the cache hasn't been seeded yet we fill the cache with the head.\n if (initialParallelRoutes === null || initialParallelRoutes.size === 0) {\n (0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(cache, undefined, initialTree, initialHead);\n }\n var _ref;\n return {\n buildId,\n tree: initialTree,\n cache,\n prefetchCache: new Map(),\n pushRef: {\n pendingPush: false,\n mpaNavigation: false\n },\n focusAndScrollRef: {\n apply: false,\n hashFragment: null,\n segmentPaths: []\n },\n canonicalUrl: // This is safe to do as canonicalUrl can't be rendered, it's only used to control the history updates in the useEffect further down in this file.\n location ? (0, _createhreffromurl.createHrefFromUrl)(location) : initialCanonicalUrl,\n nextUrl: (_ref = (0, _computechangedpath.extractPathFromFlightRouterState)(initialTree) || (location == null ? void 0 : location.pathname)) != null ? _ref : null\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=create-initial-router-state.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9jcmVhdGUtaW5pdGlhbC1yb3V0ZXItc3RhdGUuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDREQUEyRDtJQUN2REksWUFBWTtJQUNaQyx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sInBhdGhuYW1lIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/create-optimistic-tree.js": /*!*******************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/create-optimistic-tree.js ***! \*******************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createOptimisticTree\", ({\n enumerable: true,\n get: function() {\n return createOptimisticTree;\n }\n}));\nconst _matchsegments = __webpack_require__(/*! ../match-segments */ \"(app-client)/./node_modules/next/dist/client/components/match-segments.js\");\nfunction createOptimisticTree(segments, flightRouterState, parentRefetch) {\n const [existingSegment, existingParallelRoutes, url, refresh, isRootLayout] = flightRouterState || [\n null,\n {}\n ];\n const segment = segments[0];\n const isLastSegment = segments.length === 1;\n const segmentMatches = existingSegment !== null && (0, _matchsegments.matchSegment)(existingSegment, segment);\n // if there are multiple parallel routes at this level, we need to refetch here\n // to ensure we get the correct tree. This is because we don't know which\n // parallel route will match the next segment.\n const hasMultipleParallelRoutes = Object.keys(existingParallelRoutes).length > 1;\n const shouldRefetchThisLevel = !flightRouterState || !segmentMatches || hasMultipleParallelRoutes;\n let parallelRoutes = {};\n if (existingSegment !== null && segmentMatches) {\n parallelRoutes = existingParallelRoutes;\n }\n let childTree;\n // if there's multiple parallel routes at this level, we shouldn't create an\n // optimistic tree for the next level because we don't know which one will\n // match the next segment.\n if (!isLastSegment && !hasMultipleParallelRoutes) {\n const childItem = createOptimisticTree(segments.slice(1), parallelRoutes ? parallelRoutes.children : null, parentRefetch || shouldRefetchThisLevel);\n childTree = childItem;\n }\n const result = [\n segment,\n {\n ...parallelRoutes,\n ...childTree ? {\n children: childTree\n } : {}\n }\n ];\n if (url) {\n result[2] = url;\n }\n if (!parentRefetch && shouldRefetchThisLevel) {\n result[3] = \"refetch\";\n } else if (segmentMatches && refresh) {\n result[3] = refresh;\n }\n if (segmentMatches && isRootLayout) {\n result[4] = isRootLayout;\n }\n return result;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=create-optimistic-tree.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9jcmVhdGUtb3B0aW1pc3RpYy10cmVlLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCx3REFBdUQ7SUFDbkRJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyxpQkFBaUJDLG1CQUFPQSxDQUFDLG9HQUFtQjtBQUNsRCxTQUFTRixxQkFBcUJHLFFBQVEsRUFBRUMsaUJBQWlCLEVBQUVDLGFBQWE7SUFDcEUsTUFBTSxDQUFDQyxpQkFBaUJDLHdCQUF3QkMsS0FBS0MsU0FBU0MsYUFBYSxHQUFHTixxQkFBcUI7UUFDL0Y7UUFDQSxDQUFDO0tBQ0o7SUFDRCxNQUFNTyxVQUFVUixRQUFRLENBQUMsRUFBRTtJQUMzQixNQUFNUyxnQkFBZ0JULFNBQVNVLE1BQU0sS0FBSztJQUMxQyxNQUFNQyxpQkFBaUJSLG9CQUFvQixRQUFRLENBQUMsR0FBR0wsZUFBZWMsWUF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tZW50cyIsImZsaWdodFJvdXRlclN0YXRlIiwicGFyZW50UmVmZXRjaCIsImV4aXN0aW5nU2VnbWVudCIsImV4aXN0aW5nUGFyYWxsZWxSb3V0ZXMiLCJ1cmwiLCJyZWZyZXNoIiwiaXNSb290TGF5b3V0Iiwic2VnbWVudCIsImlzTGFzdFNlZ21lbnQiLCJsZW5ndGgiLCJzZWdtZW50TWF0Y2hlcyIsIm1hdGNoU2VnbWVudCIsImhhc011bHRpcGxlUGFyYWxsZWxSb3V0ZXMiLCJrZXlzIiwic2hvdWxkUmVmZXRjaFRoaXNMZXZlbCIsInBhcmFsbGVsUm91dGVzIiwiY2hpbGRUcmVlIiwiY2hpbGRJdGVtIiwic2xpY2UiLCJjaGlsZHJlbiIsInJlc3VsdCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/create-optimistic-tree.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Create data fetching record for Promise.\n */ // TODO-APP: change `any` to type inference.\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createRecordFromThenable\", ({\n enumerable: true,\n get: function() {\n return createRecordFromThenable;\n }\n}));\nfunction createRecordFromThenable(thenable) {\n thenable.status = \"pending\";\n thenable.then((value)=>{\n if (thenable.status === \"pending\") {\n thenable.status = \"fulfilled\";\n thenable.value = value;\n }\n }, (err)=>{\n if (thenable.status === \"pending\") {\n thenable.status = \"rejected\";\n thenable.value = err;\n }\n });\n return thenable;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=create-record-from-thenable.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9jcmVhdGUtcmVjb3JkLWZyb20tdGhlbmFibGUuanMiLCJtYXBwaW5ncyI6IkFBQUE7O0NBRUMsR0FBRyw0Q0FBNEM7QUFDbkM7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDREQUEyRDtJQUN2REksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLFNBQVNBLHlCQUF5QkMsUUFBUTtJQUN0Q0EsU0FBU0MsTUFBTSxHQUFHO0lBQ2xCRCxTQUFTRSxJQUFJLENBQUMsQ0FBQ047UUFDWCxJQUFJSSxTQUFTQyxNQUFNLEtBQUssV0FBVztZQUMvQkQsU0FBU0MsTUFBTSxHQUFHO1lBQ2xCRCxTQUFTSixLQUFLLEdBQUdBO1FBQ3JCO0lBQ0osR0FBRyxDQUFDTztRQUNBLElBQUlILFNBQVNDLE1BQU0sS0FBSyxXQUFXO1lBQy9CRCxTQUFTQyxNQUFNLEdBQUc7WUFDbEJELFNBQVNKLEtBQUssR0FBR087UUFDckI7SUFDSjtJQUNBLE9BQU9IO0FBQ1g7QUFFQSxJQUFJLENBQUMsT0FBT0wsUUFBUVMsT0FBTyxLQUFLLGNBQWUsT0FBT1QsUUFBUVMsT0FBTyxLQUFLLFlBQVlULFFBQVFTLE9BQU8sS0FBSyxJQUFJLEtBQU0sT0FBT1QsUUFBUVMsT0FBTyxDQUFDQyxVQUFVLEt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sImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js": /*!********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js ***! \********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createRouterCacheKey\", ({\n enumerable: true,\n get: function() {\n return createRouterCacheKey;\n }\n}));\nfunction createRouterCacheKey(segment, withoutSearchParameters) {\n if (withoutSearchParameters === void 0) withoutSearchParameters = false;\n return Array.isArray(segment) ? segment[0] + \"|\" + segment[1] + \"|\" + segment[2] : withoutSearchParameters && segment.startsWith(\"__PAGE__\") ? \"__PAGE__\" : segment;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=create-router-cache-key.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9jcmVhdGUtcm91dGVyLWNhY2hlLWtleS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsd0RBQXVEO0lBQ25ESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFD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pzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJjcmVhdGVSb3V0ZXJDYWNoZUtleSIsInNlZ21lbnQiLCJ3aXRob3V0U2VhcmNoUGFyYW1ldGVycyIsIkFycmF5IiwiaXNBcnJheSIsInN0YXJ0c1dpdGgiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js": /*!******************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js ***! \******************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"fetchServerResponse\", ({\n enumerable: true,\n get: function() {\n return fetchServerResponse;\n }\n}));\nconst _client = __webpack_require__(/*! react-server-dom-webpack/client */ \"(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.js\");\nconst _approuterheaders = __webpack_require__(/*! ../app-router-headers */ \"(app-client)/./node_modules/next/dist/client/components/app-router-headers.js\");\nconst _approuter = __webpack_require__(/*! ../app-router */ \"(app-client)/./node_modules/next/dist/client/components/app-router.js\");\nconst _appcallserver = __webpack_require__(/*! ../../app-call-server */ \"(app-client)/./node_modules/next/dist/client/app-call-server.js\");\nconst _routerreducertypes = __webpack_require__(/*! ./router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _hash = __webpack_require__(/*! ../../../shared/lib/hash */ \"(app-client)/./node_modules/next/dist/shared/lib/hash.js\");\nfunction doMpaNavigation(url) {\n return [\n (0, _approuter.urlToUrlWithoutFlightMarker)(url).toString(),\n undefined\n ];\n}\nasync function fetchServerResponse(url, flightRouterState, nextUrl, currentBuildId, prefetchKind) {\n const headers = {\n // Enable flight response\n [_approuterheaders.RSC]: \"1\",\n // Provide the current router state\n [_approuterheaders.NEXT_ROUTER_STATE_TREE]: encodeURIComponent(JSON.stringify(flightRouterState))\n };\n /**\n * Three cases:\n * - `prefetchKind` is `undefined`, it means it's a normal navigation, so we want to prefetch the page data fully\n * - `prefetchKind` is `full` - we want to prefetch the whole page so same as above\n * - `prefetchKind` is `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully\n */ if (prefetchKind === _routerreducertypes.PrefetchKind.AUTO) {\n headers[_approuterheaders.NEXT_ROUTER_PREFETCH] = \"1\";\n }\n if (nextUrl) {\n headers[_approuterheaders.NEXT_URL] = nextUrl;\n }\n const uniqueCacheQuery = (0, _hash.hexHash)([\n headers[_approuterheaders.NEXT_ROUTER_PREFETCH] || \"0\",\n headers[_approuterheaders.NEXT_ROUTER_STATE_TREE]\n ].join(\",\"));\n try {\n let fetchUrl = new URL(url);\n if (false) {}\n // Add unique cache query to avoid caching conflicts on CDN which don't respect to Vary header\n fetchUrl.searchParams.set(_approuterheaders.NEXT_RSC_UNION_QUERY, uniqueCacheQuery);\n const res = await fetch(fetchUrl, {\n // Backwards compat for older browsers. `same-origin` is the default in modern browsers.\n credentials: \"same-origin\",\n headers\n });\n const responseUrl = (0, _approuter.urlToUrlWithoutFlightMarker)(res.url);\n const canonicalUrl = res.redirected ? responseUrl : undefined;\n const contentType = res.headers.get(\"content-type\") || \"\";\n let isFlightResponse = contentType === _approuterheaders.RSC_CONTENT_TYPE_HEADER;\n if (false) {}\n // If fetch returns something different than flight response handle it like a mpa navigation\n // If the fetch was not 200, we also handle it like a mpa navigation\n if (!isFlightResponse || !res.ok) {\n return doMpaNavigation(responseUrl.toString());\n }\n // Handle the `fetch` readable stream that can be unwrapped by `React.use`.\n const [buildId, flightData] = await (0, _client.createFromFetch)(Promise.resolve(res), {\n callServer: _appcallserver.callServer\n });\n if (currentBuildId !== buildId) {\n return doMpaNavigation(res.url);\n }\n return [\n flightData,\n canonicalUrl\n ];\n } catch (err) {\n console.error(\"Failed to fetch RSC payload. Falling back to browser navigation.\", err);\n // If fetch fails handle it like a mpa navigation\n // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.\n // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.\n return [\n url.toString(),\n undefined\n ];\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fetch-server-response.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9mZXRjaC1zZXJ2ZXItcmVzcG9uc2UuanMiLCJtYXBwaW5ncyI6InFEQUNhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCx1REFBc0Q7SUFDbERJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyxVQUFVQyxtQkFBT0EsQ0FBQywwSEFBaUM7QUFDekQsTUFBTUMsb0JBQW9CRCxtQkFBT0EsQ0FBQyw0R0FBdUI7QUFDekQsTUFBTUUsYUFBYUYsbUJBQU9BLENBQUMsNEZBQWU7QUFDMUMsTUFBTUcsaUJBQWlCSCxtQkFBT0EsQ0FBQyw4RkFBdUI7QUFDdEQsTUFBTUksc0JBQXNCSixtQkFBT0EsQ0FBQyw4SEFBd0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luZyIsInVuZGVmaW5lZCIsImZsaWdodFJvdXRlclN0YXRlIiwibmV4dFVybCIsImN1cnJlbnRCdWlsZElkIiwicHJlZmV0Y2hLaW5kIiwiaGVhZGVycyIsIlJTQyIsIk5FWFRfUk9VVEVSX1NUQVRFX1RSRUUiLCJlbmNvZGVVUklDb21wb25lbnQiLCJKU09OIiwic3RyaW5naWZ5IiwiUHJlZmV0Y2hLaW5kIiwiQVVUTyIsIk5FWFRfUk9VVEVSX1BSRUZFVENIIiwiTkVYVF9VUkwiLCJ1bmlxdWVDYWNoZVF1ZXJ5IiwiaGV4SGFzaCIsImpvaW4iLCJmZXRjaFVybCIsIlVSTCIsInByb2Nlc3MiLCJlbnYiLCJfX05FWFRfQ09ORklHX09VVFBVVCIsInBhdGhuYW1lIiwiZW5kc1dpdGgiLCJzZWFyY2hQYXJhbXMiLCJzZXQiLCJORVhUX1JTQ19VTklPTl9RVUVSWSIsInJlcyIsImZldGNoIiwiY3JlZGVudGlhbHMiLCJyZXNwb25zZVVybCIsImNhbm9uaWNhbFVybCIsInJlZGlyZWN0ZWQiLCJjb250ZW50VHlwZSIsImlzRmxpZ2h0UmVzcG9uc2UiLCJSU0NfQ09OVEVOVF9UWVBFX0hFQURFUiIsInN0YXJ0c1dpdGgiLCJvayIsImJ1aWxkSWQiLCJmbGlnaHREYXRhIiwiY3JlYXRlRnJvbUZldGNoIiwiUHJvbWlzZSIsInJlc29sdmUiLCJjYWxsU2VydmVyIiwiZXJyIiwiY29uc29sZSIsImVycm9yIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-data-property.js": /*!**************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/fill-cache-with-data-property.js ***! \**************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"fillCacheWithDataProperty\", ({\n enumerable: true,\n get: function() {\n return fillCacheWithDataProperty;\n }\n}));\nconst _approutercontext = __webpack_require__(/*! ../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _createroutercachekey = __webpack_require__(/*! ./create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction fillCacheWithDataProperty(newCache, existingCache, flightSegmentPath, fetchResponse, bailOnParallelRoutes) {\n if (bailOnParallelRoutes === void 0) bailOnParallelRoutes = false;\n const isLastEntry = flightSegmentPath.length <= 2;\n const [parallelRouteKey, segment] = flightSegmentPath;\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);\n const existingChildSegmentMap = existingCache.parallelRoutes.get(parallelRouteKey);\n if (!existingChildSegmentMap || bailOnParallelRoutes && existingCache.parallelRoutes.size > 1) {\n // Bailout because the existing cache does not have the path to the leaf node\n // or the existing cache has multiple parallel routes\n // Will trigger lazy fetch in layout-router because of missing segment\n return {\n bailOptimistic: true\n };\n }\n let childSegmentMap = newCache.parallelRoutes.get(parallelRouteKey);\n if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {\n childSegmentMap = new Map(existingChildSegmentMap);\n newCache.parallelRoutes.set(parallelRouteKey, childSegmentMap);\n }\n const existingChildCacheNode = existingChildSegmentMap.get(cacheKey);\n let childCacheNode = childSegmentMap.get(cacheKey);\n // In case of last segment start off the fetch at this level and don't copy further down.\n if (isLastEntry) {\n if (!childCacheNode || !childCacheNode.data || childCacheNode === existingChildCacheNode) {\n childSegmentMap.set(cacheKey, {\n status: _approutercontext.CacheStates.DATA_FETCH,\n data: fetchResponse(),\n subTreeData: null,\n parallelRoutes: new Map()\n });\n }\n return;\n }\n if (!childCacheNode || !existingChildCacheNode) {\n // Start fetch in the place where the existing cache doesn't have the data yet.\n if (!childCacheNode) {\n childSegmentMap.set(cacheKey, {\n status: _approutercontext.CacheStates.DATA_FETCH,\n data: fetchResponse(),\n subTreeData: null,\n parallelRoutes: new Map()\n });\n }\n return;\n }\n if (childCacheNode === existingChildCacheNode) {\n childCacheNode = {\n status: childCacheNode.status,\n data: childCacheNode.data,\n subTreeData: childCacheNode.subTreeData,\n parallelRoutes: new Map(childCacheNode.parallelRoutes)\n };\n childSegmentMap.set(cacheKey, childCacheNode);\n }\n return fillCacheWithDataProperty(childCacheNode, existingChildCacheNode, flightSegmentPath.slice(2), fetchResponse);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fill-cache-with-data-property.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9maWxsLWNhY2hlLXdpdGgtZGF0YS1wcm9wZXJ0eS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsNkRBQTREO0lBQ3hESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsb0JBQW9CQyxtQkFBT0EsQ0FBQyxzSEFBd0M7QUFDMUUsTUFBTUMsd0JBQXdCRCxtQkFBT0EsQ0FBQyxvSUFBMkI7QUFDakUsU0FBU0YsMEJBQTBCSSxRQUFRLEVBQUVDLGFBQWEsRUFBRUMsaUJBQWlCLEVBQUVDLGFB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21lbnQiLCJjYWNoZUtleSIsImNyZWF0ZVJvdXRlckNhY2hlS2V5IiwiZXhpc3RpbmdDaGlsZFNlZ21lbnRNYXAiLCJwYXJhbGxlbFJvdXRlcyIsInNpemUiLCJiYWlsT3B0aW1pc3RpYyIsImNoaWxkU2VnbWVudE1hcCIsIk1hcCIsInNldCIsImV4aXN0aW5nQ2hpbGRDYWNoZU5vZGUiLCJjaGlsZENhY2hlTm9kZSIsImRhdGEiLCJzdGF0dXMiLCJDYWNoZVN0YXRlcyIsIkRBVEFfRkVUQ0giLCJzdWJUcmVlRGF0YSIsInNsaWNlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-data-property.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js ***! \*****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"fillCacheWithNewSubTreeData\", ({\n enumerable: true,\n get: function() {\n return fillCacheWithNewSubTreeData;\n }\n}));\nconst _approutercontext = __webpack_require__(/*! ../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _invalidatecachebyrouterstate = __webpack_require__(/*! ./invalidate-cache-by-router-state */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js\");\nconst _filllazyitemstillleafwithhead = __webpack_require__(/*! ./fill-lazy-items-till-leaf-with-head */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js\");\nconst _createroutercachekey = __webpack_require__(/*! ./create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction fillCacheWithNewSubTreeData(newCache, existingCache, flightDataPath, wasPrefetched) {\n const isLastEntry = flightDataPath.length <= 5;\n const [parallelRouteKey, segment] = flightDataPath;\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);\n const existingChildSegmentMap = existingCache.parallelRoutes.get(parallelRouteKey);\n if (!existingChildSegmentMap) {\n // Bailout because the existing cache does not have the path to the leaf node\n // Will trigger lazy fetch in layout-router because of missing segment\n return;\n }\n let childSegmentMap = newCache.parallelRoutes.get(parallelRouteKey);\n if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {\n childSegmentMap = new Map(existingChildSegmentMap);\n newCache.parallelRoutes.set(parallelRouteKey, childSegmentMap);\n }\n const existingChildCacheNode = existingChildSegmentMap.get(cacheKey);\n let childCacheNode = childSegmentMap.get(cacheKey);\n if (isLastEntry) {\n if (!childCacheNode || !childCacheNode.data || childCacheNode === existingChildCacheNode) {\n childCacheNode = {\n status: _approutercontext.CacheStates.READY,\n data: null,\n subTreeData: flightDataPath[3],\n // Ensure segments other than the one we got data for are preserved.\n parallelRoutes: existingChildCacheNode ? new Map(existingChildCacheNode.parallelRoutes) : new Map()\n };\n if (existingChildCacheNode) {\n (0, _invalidatecachebyrouterstate.invalidateCacheByRouterState)(childCacheNode, existingChildCacheNode, flightDataPath[2]);\n }\n (0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(childCacheNode, existingChildCacheNode, flightDataPath[2], flightDataPath[4], wasPrefetched);\n childSegmentMap.set(cacheKey, childCacheNode);\n }\n return;\n }\n if (!childCacheNode || !existingChildCacheNode) {\n // Bailout because the existing cache does not have the path to the leaf node\n // Will trigger lazy fetch in layout-router because of missing segment\n return;\n }\n if (childCacheNode === existingChildCacheNode) {\n childCacheNode = {\n status: childCacheNode.status,\n data: childCacheNode.data,\n subTreeData: childCacheNode.subTreeData,\n parallelRoutes: new Map(childCacheNode.parallelRoutes)\n };\n childSegmentMap.set(cacheKey, childCacheNode);\n }\n fillCacheWithNewSubTreeData(childCacheNode, existingChildCacheNode, flightDataPath.slice(2), wasPrefetched);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fill-cache-with-new-subtree-data.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9maWxsLWNhY2hlLXdpdGgtbmV3LXN1YnRyZWUtZGF0YS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsK0RBQThEO0lBQzFESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsb0JBQW9CQyxtQkFBT0EsQ0FBQyxzSEFBd0M7QUFDMUUsTUFBTUMsZ0NBQWdDRCxtQkFBT0EsQ0FBQyxzSkFBb0M7QUFDbEYsTUFBTUUsaUNBQWlDRixtQkFBT0EsQ0FBQyw0SkFBdUM7QUFDdEYsTUFBTUcsd0JBQXdCSCxtQkFBT0EsQ0FBQyxvSUFBMkI7QUFDakUsU0FBU0YsNEJBQTRCTSxRQUFRLEVBQUVDLGFBQWEsRUFBRUMsY0FBYyxFQUFFQyxhQUFhO0lBQ3ZGLE1BQU1DLGNBQWNGLGVBQWVHLE1BQU0sSUFBSTtJQUM3QyxNQUFNLENBQUNDLGtCQUFrQkMsUUFBUSxHQUFHTDtJQUNwQyxNQUFNTSxXQUFXLENBQUMs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JleGlzdGluZ0NhY2hlIiwiZmxpZ2h0RGF0YVBhdGgiLCJ3YXNQcmVmZXRjaGVkIiwiaXNMYXN0RW50cnkiLCJsZW5ndGgiLCJwYXJhbGxlbFJvdXRlS2V5Iiwic2VnbWVudCIsImNhY2hlS2V5IiwiY3JlYXRlUm91dGVyQ2FjaGVLZXkiLCJleGlzdGluZ0NoaWxkU2VnbWVudE1hcCIsInBhcmFsbGVsUm91dGVzIiwiY2hpbGRTZWdtZW50TWFwIiwiTWFwIiwic2V0IiwiZXhpc3RpbmdDaGlsZENhY2hlTm9kZSIsImNoaWxkQ2FjaGVOb2RlIiwiZGF0YSIsInN0YXR1cyIsIkNhY2hlU3RhdGVzIiwiUkVBRFkiLCJzdWJUcmVlRGF0YSIsImludmFsaWRhdGVDYWNoZUJ5Um91dGVyU3RhdGUiLCJmaWxsTGF6eUl0ZW1zVGlsbExlYWZXaXRoSGVhZCIsInNsaWNlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js": /*!********************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js ***! \********************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"fillLazyItemsTillLeafWithHead\", ({\n enumerable: true,\n get: function() {\n return fillLazyItemsTillLeafWithHead;\n }\n}));\nconst _approutercontext = __webpack_require__(/*! ../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _createroutercachekey = __webpack_require__(/*! ./create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction fillLazyItemsTillLeafWithHead(newCache, existingCache, routerState, head, wasPrefetched) {\n const isLastSegment = Object.keys(routerState[1]).length === 0;\n if (isLastSegment) {\n newCache.head = head;\n return;\n }\n // Remove segment that we got data for so that it is filled in during rendering of subTreeData.\n for(const key in routerState[1]){\n const parallelRouteState = routerState[1][key];\n const segmentForParallelRoute = parallelRouteState[0];\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segmentForParallelRoute);\n if (existingCache) {\n const existingParallelRoutesCacheNode = existingCache.parallelRoutes.get(key);\n if (existingParallelRoutesCacheNode) {\n let parallelRouteCacheNode = new Map(existingParallelRoutesCacheNode);\n const existingCacheNode = parallelRouteCacheNode.get(cacheKey);\n const newCacheNode = wasPrefetched && existingCacheNode ? {\n status: existingCacheNode.status,\n data: existingCacheNode.data,\n subTreeData: existingCacheNode.subTreeData,\n parallelRoutes: new Map(existingCacheNode.parallelRoutes)\n } : {\n status: _approutercontext.CacheStates.LAZY_INITIALIZED,\n data: null,\n subTreeData: null,\n parallelRoutes: new Map(existingCacheNode == null ? void 0 : existingCacheNode.parallelRoutes)\n };\n // Overrides the cache key with the new cache node.\n parallelRouteCacheNode.set(cacheKey, newCacheNode);\n // Traverse deeper to apply the head / fill lazy items till the head.\n fillLazyItemsTillLeafWithHead(newCacheNode, existingCacheNode, parallelRouteState, head, wasPrefetched);\n newCache.parallelRoutes.set(key, parallelRouteCacheNode);\n continue;\n }\n }\n const newCacheNode = {\n status: _approutercontext.CacheStates.LAZY_INITIALIZED,\n data: null,\n subTreeData: null,\n parallelRoutes: new Map()\n };\n const existingParallelRoutes = newCache.parallelRoutes.get(key);\n if (existingParallelRoutes) {\n existingParallelRoutes.set(cacheKey, newCacheNode);\n } else {\n newCache.parallelRoutes.set(key, new Map([\n [\n cacheKey,\n newCacheNode\n ]\n ]));\n }\n fillLazyItemsTillLeafWithHead(newCacheNode, undefined, parallelRouteState, head, wasPrefetched);\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fill-lazy-items-till-leaf-with-head.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9maWxsLWxhenktaXRlbXMtdGlsbC1sZWFmLXdpdGgtaGVhZC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsaUVBQWdFO0lBQzVESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsb0JBQW9CQyxtQkFBT0EsQ0FBQyxzSEFBd0M7QUFDMUUsTUFBTUMsd0JBQXdCRCxtQkFBT0EsQ0FBQyxvSUFBMkI7QUFDakUsU0FBU0YsOEJBQThCSSxRQUFRLEVBQUVDLGFBQWEsRUFBRUMsV0FBVyxFQUFFQyxJQUFJLEVBQUVDLGFBQWE7SUFDNUYsTUFBTUMsZ0JBQWdCZixPQUFPZ0IsSUFBSSxDQUFDSixXQUFXLENBQUMsRUFBRSxFQUFFSyxNQUFNLEtBQUs7SUFDN0QsSUFBSUYsZUFBZTtRQUNmTCxTQUFTRyxJQUFJLEdBQUdBO1FBQ2hCO0lBQ0o7SUFDQSwrRkFBK0Y7SUFDL0YsSUFBSSxNQUFNSyxPQUFPTixXQUFXLENBQUMsRUFBRSxDQUFDO1FBQzVCLE1BQU1PLHFCQUFxQlAsV0FBVyxDQUFDLEVBQUUsQ0FBQ00sSUFBSTtRQUM5Qyx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ZXhpc3RpbmdQYXJhbGxlbFJvdXRlcyIsInVuZGVmaW5lZCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/get-prefetch-cache-entry-status.js": /*!****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/get-prefetch-cache-entry-status.js ***! \****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n PrefetchCacheEntryStatus: function() {\n return PrefetchCacheEntryStatus;\n },\n getPrefetchEntryCacheStatus: function() {\n return getPrefetchEntryCacheStatus;\n }\n});\nconst FIVE_MINUTES = 5 * 60 * 1000;\nconst THIRTY_SECONDS = 30 * 1000;\nvar PrefetchCacheEntryStatus;\n(function(PrefetchCacheEntryStatus) {\n PrefetchCacheEntryStatus[\"fresh\"] = \"fresh\";\n PrefetchCacheEntryStatus[\"reusable\"] = \"reusable\";\n PrefetchCacheEntryStatus[\"expired\"] = \"expired\";\n PrefetchCacheEntryStatus[\"stale\"] = \"stale\";\n})(PrefetchCacheEntryStatus || (PrefetchCacheEntryStatus = {}));\nfunction getPrefetchEntryCacheStatus(param) {\n let { kind, prefetchTime, lastUsedTime } = param;\n // if the cache entry was prefetched or read less than 30s ago, then we want to re-use it\n if (Date.now() < (lastUsedTime != null ? lastUsedTime : prefetchTime) + THIRTY_SECONDS) {\n return lastUsedTime ? \"reusable\" : \"fresh\";\n }\n // if the cache entry was prefetched less than 5 mins ago, then we want to re-use only the loading state\n if (kind === \"auto\") {\n if (Date.now() < prefetchTime + FIVE_MINUTES) {\n return \"stale\";\n }\n }\n // if the cache entry was prefetched less than 5 mins ago and was a \"full\" prefetch, then we want to re-use it \"full\n if (kind === \"full\") {\n if (Date.now() < prefetchTime + FIVE_MINUTES) {\n return \"reusable\";\n }\n }\n return \"expired\";\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=get-prefetch-cache-entry-status.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9nZXQtcHJlZmV0Y2gtY2FjaGUtZW50cnktc3RhdHVzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBR047QUFDQSxTQUFTRyxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVCxPQUFPQyxjQUFjLENBQUNPLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUUwsU0FBUztJQUNiRywwQkFBMEI7UUFDdEIsT0FBT0E7SUFDWDtJQUNBQyw2QkFBNkI7UUFDekIsT0FBT0E7SUFDWDtBQUNKO0FBQ0EsTUFBTU8sZUFBZSxJQUFJLEtBQUs7QUFDOUIsTUFBTUMsaUJBQWlCLEtBQUs7QUFDNUIsSUFBSVQ7QUFDSCxVQUFTQSx3QkFBd0I7SUFDOUJBLHdCQUF3QixDQUFDLF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BwaW5nVVJMPWdldC1wcmVmZXRjaC1jYWNoZS1lbnRyeS1zdGF0dXMuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwibW9kdWxlIiwiUHJlZmV0Y2hDYWNoZUVudHJ5U3RhdHVzIiwiZ2V0UHJlZmV0Y2hFbnRyeUNhY2hlU3RhdHVzIiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiRklWRV9NSU5VVEVTIiwiVEhJUlRZX1NFQ09ORFMiLCJwYXJhbSIsImtpbmQiLCJwcmVmZXRjaFRpbWUiLCJsYXN0VXNlZFRpbWUiLCJEYXRlIiwibm93IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/get-prefetch-cache-entry-status.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js": /*!***********************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/handle-mutable.js ***! \***********************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"handleMutable\", ({\n enumerable: true,\n get: function() {\n return handleMutable;\n }\n}));\nconst _computechangedpath = __webpack_require__(/*! ./compute-changed-path */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/compute-changed-path.js\");\nfunction handleMutable(state, mutable) {\n var _mutable_shouldScroll;\n // shouldScroll is true by default, can override to false.\n const shouldScroll = (_mutable_shouldScroll = mutable.shouldScroll) != null ? _mutable_shouldScroll : true;\n var _mutable_scrollableSegments, _computeChangedPath;\n return {\n buildId: state.buildId,\n // Set href.\n canonicalUrl: mutable.canonicalUrl != null ? mutable.canonicalUrl === state.canonicalUrl ? state.canonicalUrl : mutable.canonicalUrl : state.canonicalUrl,\n pushRef: {\n pendingPush: mutable.pendingPush != null ? mutable.pendingPush : state.pushRef.pendingPush,\n mpaNavigation: mutable.mpaNavigation != null ? mutable.mpaNavigation : state.pushRef.mpaNavigation\n },\n // All navigation requires scroll and focus management to trigger.\n focusAndScrollRef: {\n apply: shouldScroll ? (mutable == null ? void 0 : mutable.scrollableSegments) !== undefined ? true : state.focusAndScrollRef.apply : false,\n hashFragment: shouldScroll ? mutable.hashFragment && mutable.hashFragment !== \"\" ? decodeURIComponent(mutable.hashFragment.slice(1)) : state.focusAndScrollRef.hashFragment : null,\n segmentPaths: shouldScroll ? (_mutable_scrollableSegments = mutable == null ? void 0 : mutable.scrollableSegments) != null ? _mutable_scrollableSegments : state.focusAndScrollRef.segmentPaths : []\n },\n // Apply cache.\n cache: mutable.cache ? mutable.cache : state.cache,\n prefetchCache: mutable.prefetchCache ? mutable.prefetchCache : state.prefetchCache,\n // Apply patched router state.\n tree: mutable.patchedTree !== undefined ? mutable.patchedTree : state.tree,\n nextUrl: mutable.patchedTree !== undefined ? (_computeChangedPath = (0, _computechangedpath.computeChangedPath)(state.tree, mutable.patchedTree)) != null ? _computeChangedPath : state.canonicalUrl : state.nextUrl\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=handle-mutable.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9oYW5kbGUtbXV0YWJsZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNH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dQdXNoIiwibXBhTmF2aWdhdGlvbiIsImZvY3VzQW5kU2Nyb2xsUmVmIiwiYXBwbHkiLCJzY3JvbGxhYmxlU2VnbWVudHMiLCJ1bmRlZmluZWQiLCJoYXNoRnJhZ21lbnQiLCJkZWNvZGVVUklDb21wb25lbnQiLCJzbGljZSIsInNlZ21lbnRQYXRocyIsImNhY2hlIiwicHJlZmV0Y2hDYWNoZSIsInRyZWUiLCJwYXRjaGVkVHJlZSIsIm5leHRVcmwiLCJjb21wdXRlQ2hhbmdlZFBhdGgiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js": /*!**************************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js ***! \**************************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"invalidateCacheBelowFlightSegmentPath\", ({\n enumerable: true,\n get: function() {\n return invalidateCacheBelowFlightSegmentPath;\n }\n}));\nconst _createroutercachekey = __webpack_require__(/*! ./create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction invalidateCacheBelowFlightSegmentPath(newCache, existingCache, flightSegmentPath) {\n const isLastEntry = flightSegmentPath.length <= 2;\n const [parallelRouteKey, segment] = flightSegmentPath;\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);\n const existingChildSegmentMap = existingCache.parallelRoutes.get(parallelRouteKey);\n if (!existingChildSegmentMap) {\n // Bailout because the existing cache does not have the path to the leaf node\n // Will trigger lazy fetch in layout-router because of missing segment\n return;\n }\n let childSegmentMap = newCache.parallelRoutes.get(parallelRouteKey);\n if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {\n childSegmentMap = new Map(existingChildSegmentMap);\n newCache.parallelRoutes.set(parallelRouteKey, childSegmentMap);\n }\n // In case of last entry don't copy further down.\n if (isLastEntry) {\n childSegmentMap.delete(cacheKey);\n return;\n }\n const existingChildCacheNode = existingChildSegmentMap.get(cacheKey);\n let childCacheNode = childSegmentMap.get(cacheKey);\n if (!childCacheNode || !existingChildCacheNode) {\n // Bailout because the existing cache does not have the path to the leaf node\n // Will trigger lazy fetch in layout-router because of missing segment\n return;\n }\n if (childCacheNode === existingChildCacheNode) {\n childCacheNode = {\n status: childCacheNode.status,\n data: childCacheNode.data,\n subTreeData: childCacheNode.subTreeData,\n parallelRoutes: new Map(childCacheNode.parallelRoutes)\n };\n childSegmentMap.set(cacheKey, childCacheNode);\n }\n invalidateCacheBelowFlightSegmentPath(childCacheNode, existingChildCacheNode, flightSegmentPath.slice(2));\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=invalidate-cache-below-flight-segmentpath.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9pbnZhbGlkYXRlLWNhY2hlLWJlbG93LWZsaWdodC1zZWdtZW50cGF0aC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgseUVBQXdFO0lBQ3BFSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0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ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW52YWxpZGF0ZS1jYWNoZS1iZWxvdy1mbGlnaHQtc2VnbWVudHBhdGguanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsImludmFsaWRhdGVDYWNoZUJlbG93RmxpZ2h0U2VnbWVudFBhdGgiLCJfY3JlYXRlcm91dGVyY2FjaGVrZXkiLCJyZXF1aXJlIiwibmV3Q2FjaGUiLCJleGlzdGluZ0NhY2hlIiwiZmxpZ2h0U2VnbWVudFBhdGgiLCJpc0xhc3RFbnRyeSIsImxlbmd0aCIsInBhcmFsbGVsUm91dGVLZXkiLCJzZWdtZW50IiwiY2FjaGVLZXkiLCJjcmVhdGVSb3V0ZXJDYWNoZUtleSIsImV4aXN0aW5nQ2hpbGRTZWdtZW50TWFwIiwicGFyYWxsZWxSb3V0ZXMiLCJjaGlsZFNlZ21lbnRNYXAiLCJNYXAiLCJzZXQiLCJkZWxldGUiLCJleGlzdGluZ0NoaWxkQ2FjaGVOb2RlIiwiY2hpbGRDYWNoZU5vZGUiLCJzdGF0dXMiLCJkYXRhIiwic3ViVHJlZURhdGEiLCJzbGljZSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js ***! \*****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"invalidateCacheByRouterState\", ({\n enumerable: true,\n get: function() {\n return invalidateCacheByRouterState;\n }\n}));\nconst _createroutercachekey = __webpack_require__(/*! ./create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction invalidateCacheByRouterState(newCache, existingCache, routerState) {\n // Remove segment that we got data for so that it is filled in during rendering of subTreeData.\n for(const key in routerState[1]){\n const segmentForParallelRoute = routerState[1][key][0];\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segmentForParallelRoute);\n const existingParallelRoutesCacheNode = existingCache.parallelRoutes.get(key);\n if (existingParallelRoutesCacheNode) {\n let parallelRouteCacheNode = new Map(existingParallelRoutesCacheNode);\n parallelRouteCacheNode.delete(cacheKey);\n newCache.parallelRoutes.set(key, parallelRouteCacheNode);\n }\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=invalidate-cache-by-router-state.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9pbnZhbGlkYXRlLWNhY2hlLWJ5LXJvdXRlci1zdGF0ZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsZ0VBQStEO0lBQzNESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsd0JBQXdCQyxtQkFBT0EsQ0FBQyxvSUFBMkI7QUFDakUsU0FBU0YsNkJBQTZ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ZGF0ZUNhY2hlQnlSb3V0ZXJTdGF0ZSIsIl9jcmVhdGVyb3V0ZXJjYWNoZWtleSIsInJlcXVpcmUiLCJuZXdDYWNoZSIsImV4aXN0aW5nQ2FjaGUiLCJyb3V0ZXJTdGF0ZSIsImtleSIsInNlZ21lbnRGb3JQYXJhbGxlbFJvdXRlIiwiY2FjaGVLZXkiLCJjcmVhdGVSb3V0ZXJDYWNoZUtleSIsImV4aXN0aW5nUGFyYWxsZWxSb3V0ZXNDYWNoZU5vZGUiLCJwYXJhbGxlbFJvdXRlcyIsInBhcmFsbGVsUm91dGVDYWNoZU5vZGUiLCJNYXAiLCJkZWxldGUiLCJzZXQiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js ***! \*****************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"isNavigatingToNewRootLayout\", ({\n enumerable: true,\n get: function() {\n return isNavigatingToNewRootLayout;\n }\n}));\nfunction isNavigatingToNewRootLayout(currentTree, nextTree) {\n // Compare segments\n const currentTreeSegment = currentTree[0];\n const nextTreeSegment = nextTree[0];\n // If any segment is different before we find the root layout, the root layout has changed.\n // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js\n // First segment is 'same' for both, keep looking. (group1) changed to (group2) before the root layout was found, it must have changed.\n if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {\n // Compare dynamic param name and type but ignore the value, different values would not affect the current root layout\n // /[name] - /slug1 and /slug2, both values (slug1 & slug2) still has the same layout /[name]/layout.js\n if (currentTreeSegment[0] !== nextTreeSegment[0] || currentTreeSegment[2] !== nextTreeSegment[2]) {\n return true;\n }\n } else if (currentTreeSegment !== nextTreeSegment) {\n return true;\n }\n // Current tree root layout found\n if (currentTree[4]) {\n // If the next tree doesn't have the root layout flag, it must have changed.\n return !nextTree[4];\n }\n // Current tree didn't have its root layout here, must have changed.\n if (nextTree[4]) {\n return true;\n }\n // We can't assume it's `parallelRoutes.children` here in case the root layout is `app/@something/layout.js`\n // But it's not possible to be more than one parallelRoutes before the root layout is found\n // TODO-APP: change to traverse all parallel routes\n const currentTreeChild = Object.values(currentTree[1])[0];\n const nextTreeChild = Object.values(nextTree[1])[0];\n if (!currentTreeChild || !nextTreeChild) return true;\n return isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=is-navigating-to-new-root-layout.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9pcy1uYXZpZ2F0aW5nLXRvLW5ldy1yb290LWxheW91dC5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsK0RBQThEO0lBQzFESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsU0FBU0EsNEJBQTRCQyxXQUFXLEVBQUVDLFFBQVE7SUFDdEQsbUJBQW1CO0lBQ25CLE1BQU1DL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NlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js": /*!**************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/read-record-value.js ***! \**************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Read record value or throw Promise if it's not resolved yet.\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"readRecordValue\", ({\n enumerable: true,\n get: function() {\n return readRecordValue;\n }\n}));\nfunction readRecordValue(thenable) {\n // @ts-expect-error TODO: fix type\n if (thenable.status === \"fulfilled\") {\n // @ts-expect-error TODO: fix type\n return thenable.value;\n } else {\n throw thenable;\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=read-record-value.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWFkLXJlY29yZC12YWx1ZS5qcyIsIm1hcHBpbmdzIjoiQUFBQTs7Q0FFQyxHQUFnQjtBQUNqQkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILG1EQUFrRDtJQUM5Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLFNBQVNBLGdCQUFnQkMsUUFBUTtJQUM3QixrQ0FBa0M7SUFDbEMsSUFBSUEsU0FBU0MsTUF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9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/fast-refresh-reducer.js": /*!**************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/fast-refresh-reducer.js ***! \**************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"fastRefreshReducer\", ({\n enumerable: true,\n get: function() {\n return fastRefreshReducer;\n }\n}));\nconst _fetchserverresponse = __webpack_require__(/*! ../fetch-server-response */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _createrecordfromthenable = __webpack_require__(/*! ../create-record-from-thenable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\");\nconst _readrecordvalue = __webpack_require__(/*! ../read-record-value */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js\");\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _applyrouterstatepatchtotree = __webpack_require__(/*! ../apply-router-state-patch-to-tree */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js\");\nconst _isnavigatingtonewrootlayout = __webpack_require__(/*! ../is-navigating-to-new-root-layout */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js\");\nconst _navigatereducer = __webpack_require__(/*! ./navigate-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js\");\nconst _handlemutable = __webpack_require__(/*! ../handle-mutable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js\");\nconst _applyflightdata = __webpack_require__(/*! ../apply-flight-data */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js\");\n// A version of refresh reducer that keeps the cache around instead of wiping all of it.\nfunction fastRefreshReducerImpl(state, action) {\n const { cache, mutable, origin } = action;\n const href = state.canonicalUrl;\n const isForCurrentTree = JSON.stringify(mutable.previousTree) === JSON.stringify(state.tree);\n if (isForCurrentTree) {\n return (0, _handlemutable.handleMutable)(state, mutable);\n }\n if (!cache.data) {\n // TODO-APP: verify that `href` is not an external url.\n // Fetch data from the root of the tree.\n cache.data = (0, _createrecordfromthenable.createRecordFromThenable)((0, _fetchserverresponse.fetchServerResponse)(new URL(href, origin), [\n state.tree[0],\n state.tree[1],\n state.tree[2],\n \"refetch\"\n ], state.nextUrl, state.buildId));\n }\n const [flightData, canonicalUrlOverride] = (0, _readrecordvalue.readRecordValue)(cache.data);\n // Handle case when navigating to page in `pages` from `app`\n if (typeof flightData === \"string\") {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);\n }\n // Remove cache.data as it has been resolved at this point.\n cache.data = null;\n let currentTree = state.tree;\n let currentCache = state.cache;\n for (const flightDataPath of flightData){\n // FlightDataPath with more than two items means unexpected Flight data was returned\n if (flightDataPath.length !== 3) {\n // TODO-APP: handle this case better\n console.log(\"REFRESH FAILED\");\n return state;\n }\n // Given the path can only have two items the items are only the router state and subTreeData for the root.\n const [treePatch] = flightDataPath;\n const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([\n \"\"\n ], currentTree, treePatch);\n if (newTree === null) {\n throw new Error(\"SEGMENT MISMATCH\");\n }\n if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, href, state.pushRef.pendingPush);\n }\n const canonicalUrlOverrideHref = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : undefined;\n if (canonicalUrlOverride) {\n mutable.canonicalUrl = canonicalUrlOverrideHref;\n }\n const applied = (0, _applyflightdata.applyFlightData)(currentCache, cache, flightDataPath);\n if (applied) {\n mutable.cache = cache;\n currentCache = cache;\n }\n mutable.previousTree = currentTree;\n mutable.patchedTree = newTree;\n mutable.canonicalUrl = href;\n currentTree = newTree;\n }\n return (0, _handlemutable.handleMutable)(state, mutable);\n}\nfunction fastRefreshReducerNoop(state, _action) {\n return state;\n}\nconst fastRefreshReducer = false ? 0 : fastRefreshReducerImpl;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fast-refresh-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9mYXN0LXJlZnJlc2gtcmVkdWNlci5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsdUJBQXVCQyxtQkFBT0EsQ0FBQyxpSUFBMEI7QUFDL0QsTUFBTUMsNEJBQTRCRCxtQkFBT0EsQ0FBQyw2SUFBZ0M7QUFDMUUsTUFBTUUsbUJBQW1CRixtQkFBT0EsQ0FBQyx5SEFBc0I7QUFDdkQsTUFBTUcscUJBQXFCSCxtQkFBT0EsQ0FBQywrSEFBeUI7QUFDNUQsTUFBTUksK0JBQStCSixtQkFBT0EsQ0FBQyx1SkFBcUM7QUFDbEYsTUFBTUssK0JBQStCTCxtQkFBT0EsQ0FBQyx1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wiZmFzdFJlZnJlc2hSZWR1Y2VySW1wbCIsInN0YXRlIiwiYWN0aW9uIiwiY2FjaGUiLCJtdXRhYmxlIiwib3JpZ2luIiwiaHJlZiIsImNhbm9uaWNhbFVybCIsImlzRm9yQ3VycmVudFRyZWUiLCJKU09OIiwic3RyaW5naWZ5IiwicHJldmlvdXNUcmVlIiwidHJlZSIsImhhbmRsZU11dGFibGUiLCJkYXRhIiwiY3JlYXRlUmVjb3JkRnJvbVRoZW5hYmxlIiwiZmV0Y2hTZXJ2ZXJSZXNwb25zZSIsIlVSTCIsIm5leHRVcmwiLCJidWlsZElkIiwiZmxpZ2h0RGF0YSIsImNhbm9uaWNhbFVybE92ZXJyaWRlIiwicmVhZFJlY29yZFZhbHVlIiwiaGFuZGxlRXh0ZXJuYWxVcmwiLCJwdXNoUmVmIiwicGVuZGluZ1B1c2giLCJjdXJyZW50VHJlZSIsImN1cnJlbnRDYWNoZSIsImZsaWdodERhdGFQYXRoIiwibGVuZ3RoIiwiY29uc29sZSIsImxvZyIsInRyZWVQYXRjaCIsIm5ld1RyZWUiLCJhcHBseVJvdXRlclN0YXRlUGF0Y2hUb1RyZWUiLCJFcnJvciIsImlzTmF2aWdhdGluZ1RvTmV3Um9vdExheW91dCIsImNhbm9uaWNhbFVybE92ZXJyaWRlSHJlZiIsImNyZWF0ZUhyZWZGcm9tVXJsIiwidW5kZWZpbmVkIiwiYXBwbGllZCIsImFwcGx5RmxpZ2h0RGF0YSIsInBhdGNoZWRUcmVlIiwiZmFzdFJlZnJlc2hSZWR1Y2VyTm9vcCIsIl9hY3Rpb24iLCJwcm9jZXNzIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/fast-refresh-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js ***! \************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"findHeadInCache\", ({\n enumerable: true,\n get: function() {\n return findHeadInCache;\n }\n}));\nconst _createroutercachekey = __webpack_require__(/*! ../create-router-cache-key */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nfunction findHeadInCache(cache, parallelRoutes) {\n const isLastItem = Object.keys(parallelRoutes).length === 0;\n if (isLastItem) {\n return cache.head;\n }\n for(const key in parallelRoutes){\n const [segment, childParallelRoutes] = parallelRoutes[key];\n const childSegmentMap = cache.parallelRoutes.get(key);\n if (!childSegmentMap) {\n continue;\n }\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);\n const cacheNode = childSegmentMap.get(cacheKey);\n if (!cacheNode) {\n continue;\n }\n const item = findHeadInCache(cacheNode, childParallelRoutes);\n if (item) {\n return item;\n }\n }\n return undefined;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=find-head-in-cache.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9maW5kLWhlYWQtaW4tY2FjaGUuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILG1EQUFrRDtJQUM5Q0ksWUFBW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tcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWZpbmQtaGVhZC1pbi1jYWNoZS5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiZmluZEhlYWRJbkNhY2hlIiwiX2NyZWF0ZXJvdXRlcmNhY2hla2V5IiwicmVxdWlyZSIsImNhY2hlIiwicGFyYWxsZWxSb3V0ZXMiLCJpc0xhc3RJdGVtIiwia2V5cyIsImxlbmd0aCIsImhlYWQiLCJrZXkiLCJzZWdtZW50IiwiY2hpbGRQYXJhbGxlbFJvdXRlcyIsImNoaWxkU2VnbWVudE1hcCIsImNhY2hlS2V5IiwiY3JlYXRlUm91dGVyQ2FjaGVLZXkiLCJjYWNoZU5vZGUiLCJpdGVtIiwidW5kZWZpbmVkIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js": /*!***********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js ***! \***********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getSegmentValue\", ({\n enumerable: true,\n get: function() {\n return getSegmentValue;\n }\n}));\nfunction getSegmentValue(segment) {\n return Array.isArray(segment) ? segment[1] : segment;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=get-segment-value.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9nZXQtc2VnbWVudC12YWx1ZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsbURBQWtEO0lBQzlDSSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsU0FBU0EsZ0JBQWdCQyxPQUFPO0lBQzVCLE9BQU9DLE1BQU1DLE9BQU8sQ0FBQ0YsV0FBV0EsT0FBTyxDQUFDLEVBQUUsR0FBR0E7QUFDakQ7QUFFQSxJQUFJLENBQUMsT0FBT0wsUUFBUVEsT0FBTyxLQUFLLGNBQWUsT0FBT1IsUUFBUVEsT0FBTyxLQUFLLFlBQVlSLFFBQVFRLE9BQU8sS0FBSyxJQUFJLEtBQU0sT0FBT1IsUUFBUVEsT0FBTyxDQUFDQyxVQUFVLEtBQUssYUFBYTtJQUNyS1gsT0FBT0MsY0FBYyxDQUFDQyxRQUFRUSxPQUFPLEVBQUUsY0FBYztRQUFFUCxPQUFPO0lBQUs7SUFDbkVILE9BQU9ZLE1BQU0sQ0FBQ1YsUUFBUVEsT0FBTyxFQUFFUjtJQUMvQlcsT0FBT1gsT0FBTyxHQUFHQSxRQUFRUSxPQUFPO0FBQ2xDLEVBRUEsNkNBQTZDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvY2xpZW50L2NvbXBvbmVudHMvcm91dGVyLXJ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HJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiZ2V0U2VnbWVudFZhbHVlIiwic2VnbWVudCIsIkFycmF5IiwiaXNBcnJheSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js": /*!**********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js ***! \**********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n handleExternalUrl: function() {\n return handleExternalUrl;\n },\n navigateReducer: function() {\n return navigateReducer;\n }\n});\nconst _approutercontext = __webpack_require__(/*! ../../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _fetchserverresponse = __webpack_require__(/*! ../fetch-server-response */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _createrecordfromthenable = __webpack_require__(/*! ../create-record-from-thenable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\");\nconst _readrecordvalue = __webpack_require__(/*! ../read-record-value */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js\");\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _invalidatecachebelowflightsegmentpath = __webpack_require__(/*! ../invalidate-cache-below-flight-segmentpath */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js\");\nconst _fillcachewithdataproperty = __webpack_require__(/*! ../fill-cache-with-data-property */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-cache-with-data-property.js\");\nconst _createoptimistictree = __webpack_require__(/*! ../create-optimistic-tree */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-optimistic-tree.js\");\nconst _applyrouterstatepatchtotree = __webpack_require__(/*! ../apply-router-state-patch-to-tree */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js\");\nconst _shouldhardnavigate = __webpack_require__(/*! ../should-hard-navigate */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js\");\nconst _isnavigatingtonewrootlayout = __webpack_require__(/*! ../is-navigating-to-new-root-layout */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js\");\nconst _routerreducertypes = __webpack_require__(/*! ../router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _handlemutable = __webpack_require__(/*! ../handle-mutable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js\");\nconst _applyflightdata = __webpack_require__(/*! ../apply-flight-data */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js\");\nconst _getprefetchcacheentrystatus = __webpack_require__(/*! ../get-prefetch-cache-entry-status */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/get-prefetch-cache-entry-status.js\");\nconst _pruneprefetchcache = __webpack_require__(/*! ./prune-prefetch-cache */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prune-prefetch-cache.js\");\nfunction handleExternalUrl(state, mutable, url, pendingPush) {\n mutable.previousTree = state.tree;\n mutable.mpaNavigation = true;\n mutable.canonicalUrl = url;\n mutable.pendingPush = pendingPush;\n mutable.scrollableSegments = undefined;\n return (0, _handlemutable.handleMutable)(state, mutable);\n}\nfunction generateSegmentsFromPatch(flightRouterPatch) {\n const segments = [];\n const [segment, parallelRoutes] = flightRouterPatch;\n if (Object.keys(parallelRoutes).length === 0) {\n return [\n [\n segment\n ]\n ];\n }\n for (const [parallelRouteKey, parallelRoute] of Object.entries(parallelRoutes)){\n for (const childSegment of generateSegmentsFromPatch(parallelRoute)){\n // If the segment is empty, it means we are at the root of the tree\n if (segment === \"\") {\n segments.push([\n parallelRouteKey,\n ...childSegment\n ]);\n } else {\n segments.push([\n segment,\n parallelRouteKey,\n ...childSegment\n ]);\n }\n }\n }\n return segments;\n}\nfunction addRefetchToLeafSegments(newCache, currentCache, flightSegmentPath, treePatch, data) {\n let appliedPatch = false;\n newCache.status = _approutercontext.CacheStates.READY;\n newCache.subTreeData = currentCache.subTreeData;\n newCache.parallelRoutes = new Map(currentCache.parallelRoutes);\n const segmentPathsToFill = generateSegmentsFromPatch(treePatch).map((segment)=>[\n ...flightSegmentPath,\n ...segment\n ]);\n for (const segmentPaths of segmentPathsToFill){\n const res = (0, _fillcachewithdataproperty.fillCacheWithDataProperty)(newCache, currentCache, segmentPaths, data);\n if (!(res == null ? void 0 : res.bailOptimistic)) {\n appliedPatch = true;\n }\n }\n return appliedPatch;\n}\nfunction navigateReducer(state, action) {\n const { url, isExternalUrl, navigateType, cache, mutable, forceOptimisticNavigation, shouldScroll } = action;\n const { pathname, hash } = url;\n const href = (0, _createhreffromurl.createHrefFromUrl)(url);\n const pendingPush = navigateType === \"push\";\n // we want to prune the prefetch cache on every navigation to avoid it growing too large\n (0, _pruneprefetchcache.prunePrefetchCache)(state.prefetchCache);\n const isForCurrentTree = JSON.stringify(mutable.previousTree) === JSON.stringify(state.tree);\n if (isForCurrentTree) {\n return (0, _handlemutable.handleMutable)(state, mutable);\n }\n if (isExternalUrl) {\n return handleExternalUrl(state, mutable, url.toString(), pendingPush);\n }\n let prefetchValues = state.prefetchCache.get((0, _createhreffromurl.createHrefFromUrl)(url, false));\n if (forceOptimisticNavigation && (prefetchValues == null ? void 0 : prefetchValues.kind) !== _routerreducertypes.PrefetchKind.TEMPORARY) {\n const segments = pathname.split(\"/\");\n // TODO-APP: figure out something better for index pages\n segments.push(\"__PAGE__\");\n // Optimistic tree case.\n // If the optimistic tree is deeper than the current state leave that deeper part out of the fetch\n const optimisticTree = (0, _createoptimistictree.createOptimisticTree)(segments, state.tree, false);\n // we need a copy of the cache in case we need to revert to it\n const temporaryCacheNode = {\n ...cache\n };\n // Copy subTreeData for the root node of the cache.\n // Note: didn't do it above because typescript doesn't like it.\n temporaryCacheNode.status = _approutercontext.CacheStates.READY;\n temporaryCacheNode.subTreeData = state.cache.subTreeData;\n temporaryCacheNode.parallelRoutes = new Map(state.cache.parallelRoutes);\n let data;\n const fetchResponse = ()=>{\n if (!data) {\n data = (0, _createrecordfromthenable.createRecordFromThenable)((0, _fetchserverresponse.fetchServerResponse)(url, optimisticTree, state.nextUrl, state.buildId));\n }\n return data;\n };\n // TODO-APP: segments.slice(1) strips '', we can get rid of '' altogether.\n // TODO-APP: re-evaluate if we need to strip the last segment\n const optimisticFlightSegmentPath = segments.slice(1).map((segment)=>[\n \"children\",\n segment\n ]).flat();\n // Copy existing cache nodes as far as possible and fill in `data` property with the started data fetch.\n // The `data` property is used to suspend in layout-router during render if it hasn't resolved yet by the time it renders.\n const res = (0, _fillcachewithdataproperty.fillCacheWithDataProperty)(temporaryCacheNode, state.cache, optimisticFlightSegmentPath, fetchResponse, true);\n // If optimistic fetch couldn't happen it falls back to the non-optimistic case.\n if (!(res == null ? void 0 : res.bailOptimistic)) {\n mutable.previousTree = state.tree;\n mutable.patchedTree = optimisticTree;\n mutable.pendingPush = pendingPush;\n mutable.hashFragment = hash;\n mutable.shouldScroll = shouldScroll;\n mutable.scrollableSegments = [];\n mutable.cache = temporaryCacheNode;\n mutable.canonicalUrl = href;\n state.prefetchCache.set((0, _createhreffromurl.createHrefFromUrl)(url, false), {\n data: Promise.resolve(data),\n // this will make sure that the entry will be discarded after 30s\n kind: _routerreducertypes.PrefetchKind.TEMPORARY,\n prefetchTime: Date.now(),\n treeAtTimeOfPrefetch: state.tree,\n lastUsedTime: Date.now()\n });\n return (0, _handlemutable.handleMutable)(state, mutable);\n }\n }\n // If we don't have a prefetch value, we need to create one\n if (!prefetchValues) {\n const data = (0, _createrecordfromthenable.createRecordFromThenable)((0, _fetchserverresponse.fetchServerResponse)(url, state.tree, state.nextUrl, state.buildId, // in order to simulate the behavior of the prefetch cache\n true ? _routerreducertypes.PrefetchKind.AUTO : 0));\n const newPrefetchValue = {\n data: Promise.resolve(data),\n // this will make sure that the entry will be discarded after 30s\n kind: true ? _routerreducertypes.PrefetchKind.AUTO : 0,\n prefetchTime: Date.now(),\n treeAtTimeOfPrefetch: state.tree,\n lastUsedTime: null\n };\n state.prefetchCache.set((0, _createhreffromurl.createHrefFromUrl)(url, false), newPrefetchValue);\n prefetchValues = newPrefetchValue;\n }\n const prefetchEntryCacheStatus = (0, _getprefetchcacheentrystatus.getPrefetchEntryCacheStatus)(prefetchValues);\n // The one before last item is the router state tree patch\n const { treeAtTimeOfPrefetch, data } = prefetchValues;\n // Unwrap cache data with `use` to suspend here (in the reducer) until the fetch resolves.\n const [flightData, canonicalUrlOverride] = (0, _readrecordvalue.readRecordValue)(data);\n // important: we should only mark the cache node as dirty after we unsuspend from the call above\n prefetchValues.lastUsedTime = Date.now();\n // Handle case when navigating to page in `pages` from `app`\n if (typeof flightData === \"string\") {\n return handleExternalUrl(state, mutable, flightData, pendingPush);\n }\n let currentTree = state.tree;\n let currentCache = state.cache;\n let scrollableSegments = [];\n for (const flightDataPath of flightData){\n const flightSegmentPath = flightDataPath.slice(0, -4);\n // The one before last item is the router state tree patch\n const treePatch = flightDataPath.slice(-3)[0];\n // TODO-APP: remove ''\n const flightSegmentPathWithLeadingEmpty = [\n \"\",\n ...flightSegmentPath\n ];\n // Create new tree based on the flightSegmentPath and router state patch\n let newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)(flightSegmentPathWithLeadingEmpty, currentTree, treePatch);\n // If the tree patch can't be applied to the current tree then we use the tree at time of prefetch\n // TODO-APP: This should instead fill in the missing pieces in `currentTree` with the data from `treeAtTimeOfPrefetch`, then apply the patch.\n if (newTree === null) {\n newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)(flightSegmentPathWithLeadingEmpty, treeAtTimeOfPrefetch, treePatch);\n }\n if (newTree !== null) {\n if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {\n return handleExternalUrl(state, mutable, href, pendingPush);\n }\n let applied = (0, _applyflightdata.applyFlightData)(currentCache, cache, flightDataPath, prefetchValues.kind === \"auto\" && prefetchEntryCacheStatus === _getprefetchcacheentrystatus.PrefetchCacheEntryStatus.reusable);\n if (!applied && prefetchEntryCacheStatus === _getprefetchcacheentrystatus.PrefetchCacheEntryStatus.stale) {\n applied = addRefetchToLeafSegments(cache, currentCache, flightSegmentPath, treePatch, ()=>(0, _fetchserverresponse.fetchServerResponse)(url, currentTree, state.nextUrl, state.buildId));\n }\n const hardNavigate = (0, _shouldhardnavigate.shouldHardNavigate)(flightSegmentPathWithLeadingEmpty, currentTree);\n if (hardNavigate) {\n cache.status = _approutercontext.CacheStates.READY;\n // Copy subTreeData for the root node of the cache.\n cache.subTreeData = currentCache.subTreeData;\n (0, _invalidatecachebelowflightsegmentpath.invalidateCacheBelowFlightSegmentPath)(cache, currentCache, flightSegmentPath);\n // Ensure the existing cache value is used when the cache was not invalidated.\n mutable.cache = cache;\n } else if (applied) {\n mutable.cache = cache;\n }\n currentCache = cache;\n currentTree = newTree;\n for (const subSegment of generateSegmentsFromPatch(treePatch)){\n const scrollableSegmentPath = [\n ...flightSegmentPath,\n ...subSegment\n ];\n // Filter out the __DEFAULT__ paths as they shouldn't be scrolled to in this case.\n if (scrollableSegmentPath[scrollableSegmentPath.length - 1] !== \"__DEFAULT__\") {\n scrollableSegments.push(scrollableSegmentPath);\n }\n }\n }\n }\n mutable.previousTree = state.tree;\n mutable.patchedTree = currentTree;\n mutable.canonicalUrl = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : href;\n mutable.pendingPush = pendingPush;\n mutable.scrollableSegments = scrollableSegments;\n mutable.hashFragment = hash;\n mutable.shouldScroll = shouldScroll;\n return (0, _handlemutable.handleMutable)(state, mutable);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=navigate-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9uYXZpZ2F0ZS1yZWR1Y2VyLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGLEtBQU1DLENBQUFBLENBR047QUFDQSxTQUFTRyxRQUFRQyxNQUFNLEVBQUVDLEdBQUc7SUFDeEIsSUFBSSxJQUFJQyxRQUFRRCxJQUFJVCxPQUFPQyxjQUFjLENBQUNPLFFBQVFFLE1BQU07UUFDcERDLFlBQVk7UUFDWkMsS0FBS0gsR0FBRyxDQUFDQyxLQUFLO0lBQ2xCO0FBQ0o7QUFDQUgsUUFBUUwsU0FBUztJQUNiRyxtQkFBbUI7UUFDZixPQUFPQTtJQUNYO0lBQ0FDLGlCQUFpQjtRQUNiLE9BQU9BO0lBQ1g7QUFDSjtBQUNBLE1BQU1PLG9CQUFvQkMsbUJBQU9BLENBQUMseUhBQTJDO0FBQzdFLE1BQU1DLHVCQUF1QkQsbUJBQU9BLENBQUMsaUlBQTBCO0FBQy9ELE1BQU1FLDRCQUE0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GFyYWxsZWxSb3V0ZV0gb2YgT2JqZWN0LmVudHJpZXMocGFyYWxsZWxSb3V0ZXMpKXtcbiAgICAgICAgZm9yIChjb25zdCBjaGlsZFNlZ21lbnQgb2YgZ2VuZXJhdGVTZWdtZW50c0Zyb21QYXRjaChwYXJhbGxlbFJvdXRlKSl7XG4gICAgICAgICAgICAvLyBJZiB0aGUgc2VnbWVudCBpcyBlbXB0eSwgaXQgbWVhbnMgd2UgYXJlIGF0IHRoZSByb290IG9mIHRoZSB0cmVlXG4gICAgICAgICAgICBpZiAoc2VnbWVudCA9PT0gXCJcIikge1xuICAgICAgICAgICAgICAgIHNlZ21lbnRzLnB1c2goW1xuICAgICAgICAgICAgICAgICAgICBwYXJhbGxlbFJvdXRlS2V5LFxuICAgICAgICAgICAgICAgICAgICAuLi5jaGlsZFNlZ21lbnRcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VnbWVudHMucHVzaChbXG4gICAgICAgICAgICAgICAgICAgIHNlZ21lbnQsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFsbGVsUm91dGVLZXksXG4gICAgICAgICAgICAgICAgICAgIC4uLmNoaWxkU2VnbWVudFxuICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzZWdtZW50cztcbn1cbmZ1bmN0aW9uIGFkZFJlZmV0Y2hUb0xlYWZTZWdtZW50cyhuZXdDYWNoZSwgY3VycmVudENhY2hlLCBmbGlnaHRTZWdtZW50UGF0aCwgdHJlZVBhdGNoLCBkYXRhKSB7XG4gICAgbGV0IGFwcGxpZWRQYXRjaCA9IGZhbHNlO1xuICAgIG5ld0NhY2hlLnN0YXR1cyA9IF9hcHByb3V0ZXJjb250ZXh0LkNhY2hlU3RhdGVzLlJFQURZO1xuICAgIG5ld0NhY2hlLnN1YlRyZWVEYXRhID0gY3VycmVudENhY2hlLnN1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JkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js": /*!**********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js ***! \**********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"prefetchReducer\", ({\n enumerable: true,\n get: function() {\n return prefetchReducer;\n }\n}));\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _fetchserverresponse = __webpack_require__(/*! ../fetch-server-response */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _routerreducertypes = __webpack_require__(/*! ../router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _createrecordfromthenable = __webpack_require__(/*! ../create-record-from-thenable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\");\nconst _pruneprefetchcache = __webpack_require__(/*! ./prune-prefetch-cache */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prune-prefetch-cache.js\");\nconst _approuterheaders = __webpack_require__(/*! ../../app-router-headers */ \"(app-client)/./node_modules/next/dist/client/components/app-router-headers.js\");\nfunction prefetchReducer(state, action) {\n // let's prune the prefetch cache before we do anything else\n (0, _pruneprefetchcache.prunePrefetchCache)(state.prefetchCache);\n const { url } = action;\n url.searchParams.delete(_approuterheaders.NEXT_RSC_UNION_QUERY);\n const href = (0, _createhreffromurl.createHrefFromUrl)(url, false);\n const cacheEntry = state.prefetchCache.get(href);\n if (cacheEntry) {\n /**\n * If the cache entry present was marked as temporary, it means that we prefetched it from the navigate reducer,\n * where we didn't have the prefetch intent. We want to update it to the new, more accurate, kind here.\n */ if (cacheEntry.kind === _routerreducertypes.PrefetchKind.TEMPORARY) {\n state.prefetchCache.set(href, {\n ...cacheEntry,\n kind: action.kind\n });\n }\n /**\n * if the prefetch action was a full prefetch and that the current cache entry wasn't one, we want to re-prefetch,\n * otherwise we can re-use the current cache entry\n **/ if (!(cacheEntry.kind === _routerreducertypes.PrefetchKind.AUTO && action.kind === _routerreducertypes.PrefetchKind.FULL)) {\n return state;\n }\n }\n // fetchServerResponse is intentionally not awaited so that it can be unwrapped in the navigate-reducer\n const serverResponse = (0, _createrecordfromthenable.createRecordFromThenable)((0, _fetchserverresponse.fetchServerResponse)(url, state.tree, state.nextUrl, state.buildId, action.kind));\n // Create new tree based on the flightSegmentPath and router state patch\n state.prefetchCache.set(href, {\n // Create new tree based on the flightSegmentPath and router state patch\n treeAtTimeOfPrefetch: state.tree,\n data: serverResponse,\n kind: action.kind,\n prefetchTime: Date.now(),\n lastUsedTime: null\n });\n return state;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=prefetch-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9wcmVmZXRjaC1yZWR1Y2VyLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxtREFBa0Q7SUFDOUNJLFlBQVk7SUFDWkMsS0FBSztRQUNEL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URL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prune-prefetch-cache.js": /*!**************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/prune-prefetch-cache.js ***! \**************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"prunePrefetchCache\", ({\n enumerable: true,\n get: function() {\n return prunePrefetchCache;\n }\n}));\nconst _getprefetchcacheentrystatus = __webpack_require__(/*! ../get-prefetch-cache-entry-status */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/get-prefetch-cache-entry-status.js\");\nfunction prunePrefetchCache(prefetchCache) {\n for (const [href, prefetchCacheEntry] of prefetchCache){\n if ((0, _getprefetchcacheentrystatus.getPrefetchEntryCacheStatus)(prefetchCacheEntry) === _getprefetchcacheentrystatus.PrefetchCacheEntryStatus.expired) {\n prefetchCache.delete(href);\n }\n }\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=prune-prefetch-cache.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9wcnVuZS1wcmVmZXRjaC1jYWNoZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1p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X2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9cHJ1bmUtcHJlZmV0Y2gtY2FjaGUuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsInBydW5lUHJlZmV0Y2hDYWNoZSIsIl9nZXRwcmVmZXRjaGNhY2hlZW50cnlzdGF0dXMiLCJyZXF1aXJlIiwicHJlZmV0Y2hDYWNoZSIsImhyZWYiLCJwcmVmZXRjaENhY2hlRW50cnkiLCJnZXRQcmVmZXRjaEVudHJ5Q2FjaGVTdGF0dXMiLCJQcmVmZXRjaENhY2hlRW50cnlTdGF0dXMiLCJleHBpcmVkIiwiZGVsZXRlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prune-prefetch-cache.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js": /*!*********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js ***! \*********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"refreshReducer\", ({\n enumerable: true,\n get: function() {\n return refreshReducer;\n }\n}));\nconst _fetchserverresponse = __webpack_require__(/*! ../fetch-server-response */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _createrecordfromthenable = __webpack_require__(/*! ../create-record-from-thenable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\");\nconst _readrecordvalue = __webpack_require__(/*! ../read-record-value */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js\");\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _applyrouterstatepatchtotree = __webpack_require__(/*! ../apply-router-state-patch-to-tree */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js\");\nconst _isnavigatingtonewrootlayout = __webpack_require__(/*! ../is-navigating-to-new-root-layout */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js\");\nconst _navigatereducer = __webpack_require__(/*! ./navigate-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js\");\nconst _handlemutable = __webpack_require__(/*! ../handle-mutable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js\");\nconst _approutercontext = __webpack_require__(/*! ../../../../shared/lib/app-router-context */ \"(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\");\nconst _filllazyitemstillleafwithhead = __webpack_require__(/*! ../fill-lazy-items-till-leaf-with-head */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js\");\nfunction refreshReducer(state, action) {\n const { cache, mutable, origin } = action;\n const href = state.canonicalUrl;\n let currentTree = state.tree;\n const isForCurrentTree = JSON.stringify(mutable.previousTree) === JSON.stringify(currentTree);\n if (isForCurrentTree) {\n return (0, _handlemutable.handleMutable)(state, mutable);\n }\n if (!cache.data) {\n // TODO-APP: verify that `href` is not an external url.\n // Fetch data from the root of the tree.\n cache.data = (0, _createrecordfromthenable.createRecordFromThenable)((0, _fetchserverresponse.fetchServerResponse)(new URL(href, origin), [\n currentTree[0],\n currentTree[1],\n currentTree[2],\n \"refetch\"\n ], state.nextUrl, state.buildId));\n }\n const [flightData, canonicalUrlOverride] = (0, _readrecordvalue.readRecordValue)(cache.data);\n // Handle case when navigating to page in `pages` from `app`\n if (typeof flightData === \"string\") {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);\n }\n // Remove cache.data as it has been resolved at this point.\n cache.data = null;\n for (const flightDataPath of flightData){\n // FlightDataPath with more than two items means unexpected Flight data was returned\n if (flightDataPath.length !== 3) {\n // TODO-APP: handle this case better\n console.log(\"REFRESH FAILED\");\n return state;\n }\n // Given the path can only have two items the items are only the router state and subTreeData for the root.\n const [treePatch] = flightDataPath;\n const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([\n \"\"\n ], currentTree, treePatch);\n if (newTree === null) {\n throw new Error(\"SEGMENT MISMATCH\");\n }\n if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, href, state.pushRef.pendingPush);\n }\n const canonicalUrlOverrideHref = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : undefined;\n if (canonicalUrlOverride) {\n mutable.canonicalUrl = canonicalUrlOverrideHref;\n }\n // The one before last item is the router state tree patch\n const [subTreeData, head] = flightDataPath.slice(-2);\n // Handles case where prefetch only returns the router tree patch without rendered components.\n if (subTreeData !== null) {\n cache.status = _approutercontext.CacheStates.READY;\n cache.subTreeData = subTreeData;\n (0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(cache, undefined, treePatch, head);\n mutable.cache = cache;\n mutable.prefetchCache = new Map();\n }\n mutable.previousTree = currentTree;\n mutable.patchedTree = newTree;\n mutable.canonicalUrl = href;\n currentTree = newTree;\n }\n return (0, _handlemutable.handleMutable)(state, mutable);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=refresh-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9yZWZyZXNoLXJlZHVjZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILGtEQUFpRDtJQUM3Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLHVCQUF1QkMsbUJBQU9BLENBQUMsaUlBQTBCO0FBQy9ELE1BQU1DLDRCQUE0QkQsbUJBQU9BLENBQUMsNklBQWdDO0FBQzFFLE1BQU1FLG1CQUFtQkYsbUJBQU9BLENBQUMseUhBQXNCO0FBQ3ZELE1BQU1HLHFCQUFxQkgsbUJBQU9BLENBQUMsK0hBQXlCO0FBQzVELE1BQU1JLCtCQUErQkosbUJBQU9BLENBQUMsdUpBQXFDO0FBQ2xGLE1BQU1LLCtCQUErQkwsbUJBQU9BLENBQUMsdUpBQXFDO0FBQ2xGLE1BQU1NLG1CQUFtQk4sbUJBQU9BLENBQUMsK0hBQW9CO0FBQ3JELE1BQU1PLGlCQUFpQlAsbUJBQU9BLENBQUMsbUhBQW1CO0FBQ2xELE1BQU1RLG9CQUFvQlIsbUJBQU9BLENBQUMseUhBQTJDO0FBQzdFLE1BQU1TLGlDQUFpQ1QsbUJBQU9BLENBQUMsNkpBQXdDO0FBQ3ZGLFNBQVNGLGVBQWVZLEtBQUssRUFBRUMsTUFBTTtJQUNqQyxNQUFNLEVBQUVDLEtBQUssRUFBR0MsT0FBTyxFQUFHQy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Um9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js": /*!*********************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js ***! \*********************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"restoreReducer\", ({\n enumerable: true,\n get: function() {\n return restoreReducer;\n }\n}));\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nfunction restoreReducer(state, action) {\n const { url, tree } = action;\n const href = (0, _createhreffromurl.createHrefFromUrl)(url);\n return {\n buildId: state.buildId,\n // Set canonical url\n canonicalUrl: href,\n pushRef: state.pushRef,\n focusAndScrollRef: state.focusAndScrollRef,\n cache: state.cache,\n prefetchCache: state.prefetchCache,\n // Restore provided tree\n tree: tree,\n nextUrl: url.pathname\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=restore-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9yZXN0b3JlLXJlZHVjZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILGtEQUFpRDtJQUM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VJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js": /*!***************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js ***! \***************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"serverActionReducer\", ({\n enumerable: true,\n get: function() {\n return serverActionReducer;\n }\n}));\nconst _appcallserver = __webpack_require__(/*! ../../../app-call-server */ \"(app-client)/./node_modules/next/dist/client/app-call-server.js\");\nconst _approuterheaders = __webpack_require__(/*! ../../app-router-headers */ \"(app-client)/./node_modules/next/dist/client/components/app-router-headers.js\");\nconst _createrecordfromthenable = __webpack_require__(/*! ../create-record-from-thenable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-record-from-thenable.js\");\nconst _readrecordvalue = __webpack_require__(/*! ../read-record-value */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/read-record-value.js\");\nconst _client = __webpack_require__(/*! react-server-dom-webpack/client */ \"(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.js\");\nconst _routerreducertypes = __webpack_require__(/*! ../router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _addbasepath = __webpack_require__(/*! ../../../add-base-path */ \"(app-client)/./node_modules/next/dist/client/add-base-path.js\");\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _redirect = __webpack_require__(/*! ../../redirect */ \"(app-client)/./node_modules/next/dist/client/components/redirect.js\");\nasync function fetchServerAction(state, param) {\n let { actionId, actionArgs } = param;\n const body = await (0, _client.encodeReply)(actionArgs);\n const res = await fetch(\"\", {\n method: \"POST\",\n headers: {\n Accept: _approuterheaders.RSC_CONTENT_TYPE_HEADER,\n \"Next-Action\": actionId,\n [_approuterheaders.NEXT_ROUTER_STATE_TREE]: JSON.stringify(state.tree),\n ... false ? 0 : {},\n ...state.nextUrl ? {\n [_approuterheaders.NEXT_URL]: state.nextUrl\n } : {}\n },\n body\n });\n const location = res.headers.get(\"x-action-redirect\");\n let revalidatedParts;\n try {\n const revalidatedHeader = JSON.parse(res.headers.get(\"x-action-revalidated\") || \"[[],0,0]\");\n revalidatedParts = {\n paths: revalidatedHeader[0] || [],\n tag: !!revalidatedHeader[1],\n cookie: revalidatedHeader[2]\n };\n } catch (e) {\n revalidatedParts = {\n paths: [],\n tag: false,\n cookie: false\n };\n }\n const redirectLocation = location ? new URL((0, _addbasepath.addBasePath)(location), window.location.origin) : undefined;\n let isFlightResponse = res.headers.get(\"content-type\") === _approuterheaders.RSC_CONTENT_TYPE_HEADER;\n if (isFlightResponse) {\n const response = await (0, _client.createFromFetch)(Promise.resolve(res), {\n callServer: _appcallserver.callServer\n });\n // if it was a redirection, then result is just a regular RSC payload\n if (location) {\n const [, payload] = response;\n return {\n actionFlightData: payload == null ? void 0 : payload[1],\n redirectLocation,\n revalidatedParts\n };\n // otherwise it's a tuple of [actionResult, actionFlightData]\n } else {\n const [actionResult, [, actionFlightData]] = response != null ? response : [];\n return {\n actionResult,\n actionFlightData,\n redirectLocation,\n revalidatedParts\n };\n }\n }\n return {\n redirectLocation,\n revalidatedParts\n };\n}\nfunction serverActionReducer(state, action) {\n // the action could be called twice so we need to check if we already have applied it\n if (action.mutable.serverActionApplied) {\n return state;\n }\n if (!action.mutable.inFlightServerAction) {\n action.mutable.previousTree = state.tree;\n action.mutable.previousUrl = state.canonicalUrl;\n action.mutable.inFlightServerAction = (0, _createrecordfromthenable.createRecordFromThenable)(fetchServerAction(state, action));\n }\n try {\n // suspends until the server action is resolved.\n const { actionResult, actionFlightData, redirectLocation, revalidatedParts } = (0, _readrecordvalue.readRecordValue)(action.mutable.inFlightServerAction);\n // Invalidate the cache for the revalidated parts. This has to be done before the\n // cache is updated with the action's flight data again.\n if (revalidatedParts.tag || revalidatedParts.cookie) {\n // Invalidate everything if the tag is set.\n state.prefetchCache.clear();\n } else if (revalidatedParts.paths.length > 0) {\n // Invalidate all subtrees that are below the revalidated paths, and invalidate\n // all the prefetch cache.\n // TODO-APP: Currently the prefetch cache doesn't have subtree information,\n // so we need to invalidate the entire cache if a path was revalidated.\n state.prefetchCache.clear();\n }\n if (redirectLocation) {\n // the redirection might have a flight data associated with it, so we'll populate the cache with it\n if (actionFlightData) {\n const href = (0, _createhreffromurl.createHrefFromUrl)(redirectLocation, false);\n const previousCacheEntry = state.prefetchCache.get(href);\n var _previousCacheEntry_kind;\n state.prefetchCache.set(href, {\n data: (0, _createrecordfromthenable.createRecordFromThenable)(Promise.resolve([\n actionFlightData,\n // TODO-APP: verify the logic around canonical URL overrides\n undefined\n ])),\n kind: (_previousCacheEntry_kind = previousCacheEntry == null ? void 0 : previousCacheEntry.kind) != null ? _previousCacheEntry_kind : _routerreducertypes.PrefetchKind.TEMPORARY,\n prefetchTime: Date.now(),\n treeAtTimeOfPrefetch: action.mutable.previousTree,\n lastUsedTime: null\n });\n }\n // we throw the redirection in the action handler so that it is caught during render\n action.reject((0, _redirect.getRedirectError)(redirectLocation.toString(), _redirect.RedirectType.push));\n } else {\n if (actionFlightData) {\n const href = (0, _createhreffromurl.createHrefFromUrl)(new URL(action.mutable.previousUrl, window.location.origin), false);\n const previousCacheEntry = state.prefetchCache.get(href);\n var _previousCacheEntry_kind1;\n state.prefetchCache.set((0, _createhreffromurl.createHrefFromUrl)(new URL(action.mutable.previousUrl, window.location.origin), false), {\n data: (0, _createrecordfromthenable.createRecordFromThenable)(Promise.resolve([\n actionFlightData,\n // TODO-APP: verify the logic around canonical URL overrides\n undefined\n ])),\n kind: (_previousCacheEntry_kind1 = previousCacheEntry == null ? void 0 : previousCacheEntry.kind) != null ? _previousCacheEntry_kind1 : _routerreducertypes.PrefetchKind.TEMPORARY,\n prefetchTime: Date.now(),\n treeAtTimeOfPrefetch: action.mutable.previousTree,\n lastUsedTime: null\n });\n // this is an intentional hack around React: we want to update the tree in a new render\n setTimeout(()=>{\n action.changeByServerResponse(action.mutable.previousTree, actionFlightData, undefined);\n });\n }\n action.resolve(actionResult);\n }\n } catch (e) {\n if (e.status === \"rejected\") {\n action.reject(e.value);\n } else {\n throw e;\n }\n }\n action.mutable.serverActionApplied = true;\n return state;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=server-action-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9zZXJ2ZXItYWN0aW9uLXJlZHVjZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILHVEQUFzRDtJQUNsREksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLGlCQUFpQkMsbUJBQU9BLENBQUMsaUdBQTBCO0FBQ3pELE1BQU1DLG9CQUFvQkQsbUJBQU9BLENBQUMsK0dBQTBCO0FBQzVELE1BQU1FLDRCQUE0QkYsbUJBQU9BLENBQUMsNklBQWdDO0FBQzFFLE1BQU1HLG1CQUFtQkgsbUJBQU9BLENBQUMseUhBQXNCO0FBQ3ZELE1BQU1JLFVBQVVKLG1CQUFPQSxDQUFDLDBIQUFpQztBQUN6RCxNQUF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TogKDAsIF9jcmVhdGVyZWNvcmRmcm9tdGhlbmFibGUuY3JlYXRlUmVjb3JkRnJvbVRoZW5hYmxlKShQcm9taXNlLnJlc29sdmUoW1xuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uRmxpZ2h0RGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE8tQVBQOiB2ZXJpZnkgdGhlIGxvZ2ljIGFyb3VuZCBjYW5vbmljYWwgVVJMIG92ZXJyaWRlc1xuICAgICAgICAgICAgICAgICAgICAgICAgdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgIF0pKSxcbiAgICAgICAgICAgICAgICAgICAga2luZDogKF9wcmV2aW91c0NhY2hlRW50cnlfa2luZCA9IHByZXZpb3VzQ2FjaGVFbnRyeSA9PSBudWxsID8gdm9pZCAwIDogcHJldmlvdXNDYWNoZUVudHJ5LmtpbmQpICE9IG51bGwgPyBfcHJldmlvdXNDYWNoZUVudHJ5X2tpbmQgOiBfcm91dGVycmVkdWNlcnR5cGVzLlByZWZldGNoS2luZC5URU1QT1JBUlksXG4gICAgICAgICAgICAgICAgICAgIHByZWZldGNoVGltZTogRGF0ZS5ub3coKSxcbiAgICAgICAgICAgICAgICAgICAgdHJlZUF0VGltZU9mUHJlZmV0Y2g6IGFjdGlvbi5tdXRhYmxlLnByZXZpb3VzVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFVzZWRUaW1lOiBudWxsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyB3ZSB0aHJvdyB0aGUgcmVkaXJlY3Rpb24gaW4gdGhlIGFjdGlvbiBoYW5kbGVyIHNvIHRoYXQgaXQgaXMgY2F1Z2h0IGR1cmluZyByZW5kZXJcbiAgICAgICAgICAgIGFjdGlvbi5yZWplY3QoKDAsIF9yZWRpcmVjdC5nZXRSZWRpcmVjdEVycm9yKShyZWRpcmVjdExvY2F0aW9uLnRvU3RyaW5nKCks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2tpbmQxID0gcHJldmlvdXNDYWNoZUVudHJ5ID09IG51bGwgPyB2b2lkIDAgOiBwcmV2aW91c0NhY2hlRW50cnkua2luZCkgIT0gbnVsbCA/IF9wcmV2aW91c0NhY2hlRW50cnlfa2luZDEgOiBfcm91dGVycmVkdWNlcnR5cGVzLlByZWZldGNoS2luZC5URU1QT1JBUlksXG4gICAgICAgICAgICAgICAgICAgIHByZWZldGNoVGltZTogRGF0ZS5ub3coKSxcbiAgICAgICAgICAgICAgICAgICAgdHJlZUF0VGltZU9mUHJlZmV0Y2g6IGFjdGlvbi5tdXRhYmxlLnByZXZpb3VzVHJlZSxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFVzZWRUaW1lOiBudWxsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gdGhpcyBpcyBhbiBpbnRlbnRpb25hbCBoYWNrIGFyb3VuZCBSZWFjdDogd2Ugd2FudCB0byB1cGRhdGUgdGhlIHRyZWUgaW4gYSBuZXcgcmVuZGVyXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+e1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY2hhbmdlQnlTZXJ2ZXJSZXNwb25zZShhY3Rpb24ubXV0YWJsZS5wcmV2aW91c1RyZWUsIGFjdGlvbkZsaWdodERhdGEsIC8vIFRPRE8tQVBQOiB2ZXJpZnkgdGhlIGxvZ2ljIGFyb3VuZCBjYW5vbmljYWwgVVJMIG92ZXJyaWRlc1xuICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWN0aW9uLnJlc29sdmUoYWN0aW9uUmVzdWx0KTtcbiAgICAgICAgfVxuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgaWYgKGUuc3RhdHVzID09PSBcInJlamVjdGVkXCIpIHtcbiAgICAgICAgICAgIGFjdGlvbi5yZWplY3QoZS52YWx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GVFbnRyeSIsIl9wcmV2aW91c0NhY2hlRW50cnlfa2luZCIsInNldCIsImRhdGEiLCJraW5kIiwiUHJlZmV0Y2hLaW5kIiwiVEVNUE9SQVJZIiwicHJlZmV0Y2hUaW1lIiwiRGF0ZSIsIm5vdyIsInRyZWVBdFRpbWVPZlByZWZldGNoIiwibGFzdFVzZWRUaW1lIiwicmVqZWN0IiwiZ2V0UmVkaXJlY3RFcnJvciIsInRvU3RyaW5nIiwiUmVkaXJlY3RUeXBlIiwicHVzaCIsIl9wcmV2aW91c0NhY2hlRW50cnlfa2luZDEiLCJzZXRUaW1lb3V0IiwiY2hhbmdlQnlTZXJ2ZXJSZXNwb25zZSIsInN0YXR1cyIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js": /*!**************************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js ***! \**************************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"serverPatchReducer\", ({\n enumerable: true,\n get: function() {\n return serverPatchReducer;\n }\n}));\nconst _createhreffromurl = __webpack_require__(/*! ../create-href-from-url */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/create-href-from-url.js\");\nconst _applyrouterstatepatchtotree = __webpack_require__(/*! ../apply-router-state-patch-to-tree */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js\");\nconst _isnavigatingtonewrootlayout = __webpack_require__(/*! ../is-navigating-to-new-root-layout */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js\");\nconst _navigatereducer = __webpack_require__(/*! ./navigate-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js\");\nconst _applyflightdata = __webpack_require__(/*! ../apply-flight-data */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/apply-flight-data.js\");\nconst _handlemutable = __webpack_require__(/*! ../handle-mutable */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/handle-mutable.js\");\nfunction serverPatchReducer(state, action) {\n const { flightData, previousTree, overrideCanonicalUrl, cache, mutable } = action;\n const isForCurrentTree = JSON.stringify(previousTree) === JSON.stringify(state.tree);\n // When a fetch is slow to resolve it could be that you navigated away while the request was happening or before the reducer runs.\n // In that case opt-out of applying the patch given that the data could be stale.\n if (!isForCurrentTree) {\n // TODO-APP: Handle tree mismatch\n console.log(\"TREE MISMATCH\");\n // Keep everything as-is.\n return state;\n }\n if (mutable.previousTree) {\n return (0, _handlemutable.handleMutable)(state, mutable);\n }\n // Handle case when navigating to page in `pages` from `app`\n if (typeof flightData === \"string\") {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);\n }\n let currentTree = state.tree;\n let currentCache = state.cache;\n for (const flightDataPath of flightData){\n // Slices off the last segment (which is at -4) as it doesn't exist in the tree yet\n const flightSegmentPath = flightDataPath.slice(0, -4);\n const [treePatch] = flightDataPath.slice(-3, -2);\n const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([\n \"\",\n ...flightSegmentPath\n ], currentTree, treePatch);\n if (newTree === null) {\n throw new Error(\"SEGMENT MISMATCH\");\n }\n if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {\n return (0, _navigatereducer.handleExternalUrl)(state, mutable, state.canonicalUrl, state.pushRef.pendingPush);\n }\n const canonicalUrlOverrideHref = overrideCanonicalUrl ? (0, _createhreffromurl.createHrefFromUrl)(overrideCanonicalUrl) : undefined;\n if (canonicalUrlOverrideHref) {\n mutable.canonicalUrl = canonicalUrlOverrideHref;\n }\n (0, _applyflightdata.applyFlightData)(currentCache, cache, flightDataPath);\n mutable.previousTree = currentTree;\n mutable.patchedTree = newTree;\n mutable.cache = cache;\n currentCache = cache;\n currentTree = newTree;\n }\n return (0, _handlemutable.handleMutable)(state, mutable);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=server-patch-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yZWR1Y2Vycy9zZXJ2ZXItcGF0Y2gtcmVkdWNlci5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMscUJBQXFCQyxtQkFBT0EsQ0FBQywrSEFBeUI7QUFDNUQsTUFBTUMsK0JBQStCRCxtQkFBT0EsQ0FBQyx1SkFBcUM7QUFDbEYsTUFBTUUsK0JBQStCRixtQkFBT0EsQ0FBQyx1SkFBcUM7QUFDbEYsTUFBTUcsbUJBQW1CSCxtQkFBT0EsQ0FBQywrSEFBb0I7QUFDckQsTUFBTUksbUJBQW1CSixtQkFBT0EsQ0FBQyx5SEFBc0I7QUFDdkQsTUFBTUssaUJBQWlCTCxtQkFBT0EsQ0FBQyxtSEFBbUI7QUFDbEQsU0FBU0YsbUJBQW1CUSxLQUFLLEVBQUVDLE1BQU07SUFDckMsTUFB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sb2ciLCJoYW5kbGVNdXRhYmxlIiwiaGFuZGxlRXh0ZXJuYWxVcmwiLCJwdXNoUmVmIiwicGVuZGluZ1B1c2giLCJjdXJyZW50VHJlZSIsImN1cnJlbnRDYWNoZSIsImZsaWdodERhdGFQYXRoIiwiZmxpZ2h0U2VnbWVudFBhdGgiLCJzbGljZSIsInRyZWVQYXRjaCIsIm5ld1RyZWUiLCJhcHBseVJvdXRlclN0YXRlUGF0Y2hUb1RyZWUiLCJFcnJvciIsImlzTmF2aWdhdGluZ1RvTmV3Um9vdExheW91dCIsImNhbm9uaWNhbFVybCIsImNhbm9uaWNhbFVybE92ZXJyaWRlSHJlZiIsImNyZWF0ZUhyZWZGcm9tVXJsIiwidW5kZWZpbmVkIiwiYXBwbHlGbGlnaHREYXRhIiwicGF0Y2hlZFRyZWUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js": /*!*****************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js ***! \*****************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n PrefetchKind: function() {\n return PrefetchKind;\n },\n ACTION_REFRESH: function() {\n return ACTION_REFRESH;\n },\n ACTION_NAVIGATE: function() {\n return ACTION_NAVIGATE;\n },\n ACTION_RESTORE: function() {\n return ACTION_RESTORE;\n },\n ACTION_SERVER_PATCH: function() {\n return ACTION_SERVER_PATCH;\n },\n ACTION_PREFETCH: function() {\n return ACTION_PREFETCH;\n },\n ACTION_FAST_REFRESH: function() {\n return ACTION_FAST_REFRESH;\n },\n ACTION_SERVER_ACTION: function() {\n return ACTION_SERVER_ACTION;\n }\n});\nconst ACTION_REFRESH = \"refresh\";\nconst ACTION_NAVIGATE = \"navigate\";\nconst ACTION_RESTORE = \"restore\";\nconst ACTION_SERVER_PATCH = \"server-patch\";\nconst ACTION_PREFETCH = \"prefetch\";\nconst ACTION_FAST_REFRESH = \"fast-refresh\";\nconst ACTION_SERVER_ACTION = \"server-action\";\nvar PrefetchKind;\n(function(PrefetchKind) {\n PrefetchKind[\"AUTO\"] = \"auto\";\n PrefetchKind[\"FULL\"] = \"full\";\n PrefetchKind[\"TEMPORARY\"] = \"temporary\";\n})(PrefetchKind || (PrefetchKind = {}));\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=router-reducer-types.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yb3V0ZXItcmVkdWNlci10eXBlcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQVNOO0FBQ0EsU0FBU1MsUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsUUFBUUQsSUFBSWYsT0FBT0MsY0FBYyxDQUFDYSxRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDLEtBQUtILEdBQUcsQ0FBQ0MsS0FBSztJQUNsQjtBQUNKO0FBQ0FILFFBQVFYLFNB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sIkFDVElPTl9TRVJWRVJfQUNUSU9OIiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer.js": /*!***********************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/router-reducer.js ***! \***********************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"reducer\", ({\n enumerable: true,\n get: function() {\n return reducer;\n }\n}));\nconst _routerreducertypes = __webpack_require__(/*! ./router-reducer-types */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer-types.js\");\nconst _navigatereducer = __webpack_require__(/*! ./reducers/navigate-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js\");\nconst _serverpatchreducer = __webpack_require__(/*! ./reducers/server-patch-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js\");\nconst _restorereducer = __webpack_require__(/*! ./reducers/restore-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js\");\nconst _refreshreducer = __webpack_require__(/*! ./reducers/refresh-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js\");\nconst _prefetchreducer = __webpack_require__(/*! ./reducers/prefetch-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js\");\nconst _fastrefreshreducer = __webpack_require__(/*! ./reducers/fast-refresh-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/fast-refresh-reducer.js\");\nconst _serveractionreducer = __webpack_require__(/*! ./reducers/server-action-reducer */ \"(app-client)/./node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js\");\n/**\n * Reducer that handles the app-router state updates.\n */ function clientReducer(state, action) {\n switch(action.type){\n case _routerreducertypes.ACTION_NAVIGATE:\n {\n return (0, _navigatereducer.navigateReducer)(state, action);\n }\n case _routerreducertypes.ACTION_SERVER_PATCH:\n {\n return (0, _serverpatchreducer.serverPatchReducer)(state, action);\n }\n case _routerreducertypes.ACTION_RESTORE:\n {\n return (0, _restorereducer.restoreReducer)(state, action);\n }\n case _routerreducertypes.ACTION_REFRESH:\n {\n return (0, _refreshreducer.refreshReducer)(state, action);\n }\n case _routerreducertypes.ACTION_FAST_REFRESH:\n {\n return (0, _fastrefreshreducer.fastRefreshReducer)(state, action);\n }\n case _routerreducertypes.ACTION_PREFETCH:\n {\n return (0, _prefetchreducer.prefetchReducer)(state, action);\n }\n case _routerreducertypes.ACTION_SERVER_ACTION:\n {\n return (0, _serveractionreducer.serverActionReducer)(state, action);\n }\n // This case should never be hit as dispatch is strongly typed.\n default:\n throw new Error(\"Unknown action\");\n }\n}\nfunction serverReducer(state, _action) {\n return state;\n}\nconst reducer = false ? 0 : clientReducer;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=router-reducer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9yb3V0ZXItcmVkdWNlci5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVB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CIsInJlZnJlc2hSZWR1Y2VyIiwiQUNUSU9OX0ZBU1RfUkVGUkVTSCIsImZhc3RSZWZyZXNoUmVkdWNlciIsIkFDVElPTl9QUkVGRVRDSCIsInByZWZldGNoUmVkdWNlciIsIkFDVElPTl9TRVJWRVJfQUNUSU9OIiwic2VydmVyQWN0aW9uUmVkdWNlciIsIkVycm9yIiwic2VydmVyUmVkdWNlciIsIl9hY3Rpb24iLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/router-reducer/router-reducer.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js": /*!*****************************************************************************************!*\ !*** ./node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js ***! \*****************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"shouldHardNavigate\", ({\n enumerable: true,\n get: function() {\n return shouldHardNavigate;\n }\n}));\nconst _matchsegments = __webpack_require__(/*! ../match-segments */ \"(app-client)/./node_modules/next/dist/client/components/match-segments.js\");\nfunction shouldHardNavigate(flightSegmentPath, flightRouterState) {\n const [segment, parallelRoutes] = flightRouterState;\n // TODO-APP: Check if `as` can be replaced.\n const [currentSegment, parallelRouteKey] = flightSegmentPath;\n // Check if current segment matches the existing segment.\n if (!(0, _matchsegments.matchSegment)(currentSegment, segment)) {\n // If dynamic parameter in tree doesn't match up with segment path a hard navigation is triggered.\n if (Array.isArray(currentSegment)) {\n return true;\n }\n // If the existing segment did not match soft navigation is triggered.\n return false;\n }\n const lastSegment = flightSegmentPath.length <= 2;\n if (lastSegment) {\n return false;\n }\n return shouldHardNavigate(flightSegmentPath.slice(2), parallelRoutes[parallelRouteKey]);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=should-hard-navigate.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy9yb3V0ZXItcmVkdWNlci9zaG91bGQtaGFyZC1uYXZpZ2F0ZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsc0RBQXFEO0lBQ2pESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsTUFBTUMsaUJBQWlCQyxtQkFBT0EsQ0FBQyxvR0FBbUI7QUFDbEQsU0FBU0YsbUJBQW1CRyxpQkFBaUIsRUFBRUMsaUJBQWlCO0lBQzVELE1BQU0sQ0FBQ0MsU0FBU0MsZUFBZSxHQUFHRjtJQUNsQywyQ0FBMkM7SUFDM0MsTUFBTSxDQUFDRyxnQkFBZ0JDLGlCQUFpQixHQUFHTDtJQUMzQyx5REFBeUQ7SUFDekQsSUFBSSxDQUFDLENBQUMsR0FBR0YsZUFBZVEsWUFBWSxFQUFFRixnQkFBZ0JGLFVBQVU7UUFDNUQsa0dBQWtHO1FBQ2xHLElBQUlLLE1BQU1DLE9BQU8sQ0FBQ0osaUJBQWlCO1lBQy9CLE9BQU87UUFDWDtRQUNBLHNFQUFzRTtRQUN0RSxPQUFPO0lBQ1g7SUFDQSxNQUFNSyxjQUFjVCxrQkFBa0JVLE1BQU0sSUFBSTtJQUNoRCxJQUFJRCxhQUFhO1FBQ2IsT0FBTztJQUNYO0lBQ0EsT0FBT1osbUJBQW1CRyxrQkFB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:///(app-client)/./node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/components/use-reducer-with-devtools.js": /*!*******************************************************************************!*\ !*** ./node_modules/next/dist/client/components/use-reducer-with-devtools.js ***! \*******************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"useReducerWithReduxDevtools\", ({\n enumerable: true,\n get: function() {\n return useReducerWithReduxDevtools;\n }\n}));\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nfunction normalizeRouterState(val) {\n if (val instanceof Map) {\n const obj = {};\n for (const [key, value] of val.entries()){\n if (typeof value === \"function\") {\n obj[key] = \"fn()\";\n continue;\n }\n if (typeof value === \"object\" && value !== null) {\n if (value.$$typeof) {\n obj[key] = value.$$typeof.toString();\n continue;\n }\n if (value._bundlerConfig) {\n obj[key] = \"FlightData\";\n continue;\n }\n }\n obj[key] = normalizeRouterState(value);\n }\n return obj;\n }\n if (typeof val === \"object\" && val !== null) {\n const obj = {};\n for(const key in val){\n const value = val[key];\n if (typeof value === \"function\") {\n obj[key] = \"fn()\";\n continue;\n }\n if (typeof value === \"object\" && value !== null) {\n if (value.$$typeof) {\n obj[key] = value.$$typeof.toString();\n continue;\n }\n if (value.hasOwnProperty(\"_bundlerConfig\")) {\n obj[key] = \"FlightData\";\n continue;\n }\n }\n obj[key] = normalizeRouterState(value);\n }\n return obj;\n }\n if (Array.isArray(val)) {\n return val.map(normalizeRouterState);\n }\n return val;\n}\nfunction devToolReducer(fn, ref) {\n return (state, action)=>{\n const res = fn(state, action);\n if (ref.current) {\n ref.current.send(action, normalizeRouterState(res));\n }\n return res;\n };\n}\nfunction useReducerWithReduxDevtoolsNoop(fn, initialState) {\n const [state, dispatch] = (0, _react.useReducer)(fn, initialState);\n return [\n state,\n dispatch,\n ()=>{}\n ];\n}\nfunction useReducerWithReduxDevtoolsImpl(fn, initialState) {\n const devtoolsConnectionRef = (0, _react.useRef)();\n const enabledRef = (0, _react.useRef)();\n (0, _react.useEffect)(()=>{\n if (devtoolsConnectionRef.current || enabledRef.current === false) {\n return;\n }\n if (enabledRef.current === undefined && typeof window.__REDUX_DEVTOOLS_EXTENSION__ === \"undefined\") {\n enabledRef.current = false;\n return;\n }\n devtoolsConnectionRef.current = window.__REDUX_DEVTOOLS_EXTENSION__.connect({\n instanceId: 8000,\n name: \"next-router\"\n });\n if (devtoolsConnectionRef.current) {\n devtoolsConnectionRef.current.init(normalizeRouterState(initialState));\n }\n return ()=>{\n devtoolsConnectionRef.current = undefined;\n };\n }, [\n initialState\n ]);\n const [state, dispatch] = (0, _react.useReducer)(devToolReducer(/* logReducer( */ fn /*)*/ , devtoolsConnectionRef), initialState);\n const sync = (0, _react.useCallback)(()=>{\n if (devtoolsConnectionRef.current) {\n devtoolsConnectionRef.current.send({\n type: \"RENDER_SYNC\"\n }, normalizeRouterState(state));\n }\n }, [\n state\n ]);\n return [\n state,\n dispatch,\n sync\n ];\n}\nconst useReducerWithReduxDevtools = true ? useReducerWithReduxDevtoolsImpl : 0;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-reducer-with-devtools.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvY29tcG9uZW50cy91c2UtcmVkdWNlci13aXRoLWRldnRvb2xzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCwrREFBOEQ7SUFDMURJLF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b2JqID0ge307XG4gICAgICAgIGZvciAoY29uc3QgW2tleSwgdmFsdWVdIG9mIHZhbC5lbnRyaWVzKCkpe1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgb2JqW2tleV0gPSBcImZuKClcIjtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09IFwib2JqZWN0XCIgJiYgdmFsdWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS4kJHR5cGVvZi50b1N0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlLl9idW5kbGVyQ29uZmlnKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gXCJGbGlnaHREYXRhXCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG9ialtrZXldID0gbm9ybWFsaXplUm91dGVyU3RhdGUodmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIGlmICh0eXBlb2YgdmFsID09PSBcIm9iamVjdFwiICYmIHZhbCAhPT0gbnVsbCkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgZm9yKGNvbnN0IGtleSBpbiB2YWwpe1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSB2YWxba2V5XTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgIG9ialtrZXldID0gXCJmbigpXCI7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSBcIm9iamVjdFwiICYmIHZhbHVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlLiQkdHlwZW9mKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWUuJCR0eXBlb2YudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5oYXNPd25Qcm9wZXJ0eShcIl9idW5kbGVyQ29uZmlnXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gXCJGbGlnaHREYXRhXCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG9ialtrZXldID0gbm9ybWFsaXplUm91dGVyU3RhdGUodmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIGlmIChBcnJheS5pc0FycmF5KHZhbCkpIHtcbiAgICAgICAgcmV0dXJuIHZhbC5tYXAobm9ybWFsaXplUm91dGVyU3RhdGUpO1xuICAgIH1cbiAgICByZXR1cm4gdmFsO1xufVxuZnVuY3Rpb24gZGV2VG9vbFJlZHVjZXIoZm4sIHJlZikge1xuICAgIHJldHVybiAoc3RhdGUsIGFjdGlvbik9PntcbiAgICAgICAgY29uc3QgcmVzID0gZm4oc3RhdGUsIGFjdGlvbik7XG4gICAgICAgIGlmIChyZWYuY3VycmVudCkge1xuICAgICAgICAgICAgcmVmLmN1cnJlbnQuc2VuZChhY3Rpb24sIG5vcm1hbGl6ZVJvdXRlclN0YXRlKHJlcykpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXM7XG4gIC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WN0aW9uIiwicmVzIiwiY3VycmVudCIsInNlbmQiLCJ1c2VSZWR1Y2VyV2l0aFJlZHV4RGV2dG9vbHNOb29wIiwiaW5pdGlhbFN0YXRlIiwiZGlzcGF0Y2giLCJ1c2VSZWR1Y2VyIiwidXNlUmVkdWNlcldpdGhSZWR1eERldnRvb2xzSW1wbCIsImRldnRvb2xzQ29ubmVjdGlvblJlZiIsInVzZVJlZiIsImVuYWJsZWRSZWYiLCJ1c2VFZmZlY3QiLCJ1bmRlZmluZWQiLCJ3aW5kb3ciLCJfX1JFRFVYX0RFVlRPT0xTX0VYVEVOU0lPTl9fIiwiY29ubmVjdCIsImluc3RhbmNlSWQiLCJuYW1lIiwiaW5pdCIsInN5bmMiLCJ1c2VDYWxsYmFjayIsInR5cGUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/components/use-reducer-with-devtools.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js": /*!************************************************************************************!*\ !*** ./node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js ***! \************************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return formatWebpackMessages;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _stripansi = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"(app-client)/./node_modules/next/dist/compiled/strip-ansi/index.js\"));\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\nconst friendlySyntaxErrorLabel = \"Syntax error:\";\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS = \"\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.\";\nfunction isLikelyASyntaxError(message) {\n return (0, _stripansi.default)(message).includes(friendlySyntaxErrorLabel);\n}\nlet hadMissingSassError = false;\n// Cleans up webpack error messages.\nfunction formatMessage(message, verbose, importTraceNote) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === \"object\" && message.message) {\n const filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(trace.originName));\n let body = message.message;\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS);\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex);\n }\n message = (message.moduleName ? (0, _stripansi.default)(message.moduleName) + \"\\n\" : \"\") + (message.file ? (0, _stripansi.default)(message.file) + \"\\n\" : \"\") + body + (message.details && verbose ? \"\\n\" + message.details : \"\") + (filteredModuleTrace && filteredModuleTrace.length ? (importTraceNote || \"\\n\\nImport trace for requested module:\") + filteredModuleTrace.map((trace)=>\"\\n\" + trace.moduleName).join(\"\") : \"\") + (message.stack && verbose ? \"\\n\" + message.stack : \"\");\n }\n let lines = message.split(\"\\n\");\n // Strip Webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line)=>!/Module [A-z ]+\\(from/.test(line));\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line)=>{\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return friendlySyntaxErrorLabel + \" \" + errorMessage + \" (\" + errorLine + \":\" + errorColumn + \")\";\n });\n message = lines.join(\"\\n\");\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, \"\" + friendlySyntaxErrorLabel + \" $3 ($1:$2)\\n\");\n // Clean up export errors\n message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$2'.\");\n message = message.replace(/^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$2' does not contain a default export (imported as '$1').\");\n message = message.replace(/^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$3' (imported as '$2').\");\n lines = message.split(\"\\n\");\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === \"\") {\n lines.splice(1, 1);\n }\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf(\"Module not found: \") === 0) {\n lines = [\n lines[0],\n lines[1].replace(\"Error: \", \"\").replace(\"Module not found: Cannot find file:\", \"Cannot find file:\"),\n ...lines.slice(2)\n ];\n }\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n const firstLine = lines[0].split(\"!\");\n lines[0] = firstLine[firstLine.length - 1];\n lines[1] = \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\";\n lines[1] += \"Run `npm i sass` or `yarn add sass` inside your workspace.\\n\";\n lines[1] += \"\\nLearn more: https://nextjs.org/docs/messages/install-sass\";\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2);\n hadMissingSassError = true;\n } else if (hadMissingSassError && message.match(/(sass-loader|resolve-url-loader: CSS error)/)) {\n // dispose of unhelpful stack trace following missing sass module\n lines = [];\n }\n if (!verbose) {\n message = lines.join(\"\\n\");\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, \"\") // at ... ...:x:y\n ;\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, \"\") // at <anonymous>\n ;\n message = message.replace(/File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g, \"\");\n lines = message.split(\"\\n\");\n }\n // Remove duplicated newlines\n lines = lines.filter((line, index, arr)=>index === 0 || line.trim() !== \"\" || line.trim() !== arr[index - 1].trim());\n // Reassemble the message\n message = lines.join(\"\\n\");\n return message.trim();\n}\nfunction formatWebpackMessages(json, verbose) {\n const formattedErrors = json.errors.map((message)=>{\n const isUnknownNextFontError = message.message.includes(\"An error occured in `next/font`.\");\n return formatMessage(message, isUnknownNextFontError || verbose);\n });\n const formattedWarnings = json.warnings.map((message)=>{\n return formatMessage(message, verbose);\n });\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1;\n for(let i = 0; i < formattedErrors.length; i++){\n const error = formattedErrors[i];\n if (error.includes(\"ReactServerComponentsError\")) {\n reactServerComponentsError = i;\n break;\n }\n }\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1);\n formattedErrors.unshift(error[0]);\n }\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings\n };\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n result.warnings = [];\n }\n return result;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=format-webpack-messages.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2Vycm9yLW92ZXJsYXkvZm9ybWF0LXdlYnBhY2stbWVzc2FnZXMuanMiLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFzQkEsR0FBZ0I7QUFDaEJBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCwyQ0FBMEM7SUFDdENJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQywyQkFBMkJDLG1CQUFPQSxDQUFDLHlIQUF5QztBQUNsRixNQUFNQyxhQUFhLFdBQ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TWVzc2FnZSIsInZlcmJvc2UiLCJpbXBvcnRUcmFjZU5vdGUiLCJmaWx0ZXJlZE1vZHVsZVRyYWNlIiwibW9kdWxlVHJhY2UiLCJmaWx0ZXIiLCJ0cmFjZSIsInRlc3QiLCJvcmlnaW5OYW1lIiwiYm9keSIsImJyZWFraW5nQ2hhbmdlSW5kZXgiLCJpbmRleE9mIiwic2xpY2UiLCJtb2R1bGVOYW1lIiwiZmlsZSIsImRldGFpbHMiLCJsZW5ndGgiLCJtYXAiLCJqb2luIiwic3RhY2siLCJsaW5lcyIsInNwbGl0IiwibGluZSIsInBhcnNpbmdFcnJvciIsImV4ZWMiLCJlcnJvckxpbmUiLCJlcnJvckNvbHVtbiIsImVycm9yTWVzc2FnZSIsInJlcGxhY2UiLCJ0cmltIiwic3BsaWNlIiwibWF0Y2giLCJmaXJzdExpbmUiLCJpbmRleCIsImFyciIsImpzb24iLCJmb3JtYXR0ZWRFcnJvcnMiLCJlcnJvcnMiLCJpc1Vua25vd25OZXh0Rm9udEVycm9yIiwiZm9ybWF0dGVkV2FybmluZ3MiLCJ3YXJuaW5ncyIsInJlYWN0U2VydmVyQ29tcG9uZW50c0Vycm9yIiwiaSIsImVycm9yIiwidW5zaGlmdCIsInJlc3VsdCIsInNvbWUiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/normalize-trailing-slash.js": /*!*******************************************************************!*\ !*** ./node_modules/next/dist/client/normalize-trailing-slash.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"normalizePathTrailingSlash\", ({\n enumerable: true,\n get: function() {\n return normalizePathTrailingSlash;\n }\n}));\nconst _removetrailingslash = __webpack_require__(/*! ../shared/lib/router/utils/remove-trailing-slash */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nconst _parsepath = __webpack_require__(/*! ../shared/lib/router/utils/parse-path */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nconst normalizePathTrailingSlash = (path)=>{\n if (!path.startsWith(\"/\") || undefined) {\n return path;\n }\n const { pathname, query, hash } = (0, _parsepath.parsePath)(path);\n if (false) {}\n return \"\" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;\n};\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=normalize-trailing-slash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvbm9ybWFsaXplLXRyYWlsaW5nLXNsYXNoLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw4REFBNkQ7SUFDekRJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixNQUFNQyx1QkFBdUJDLG1CQUFPQSxDQUFDLGdKQUFrRDtBQUN2RixNQUFNQyxhQUFhRCxtQkFBT0EsQ0FBQywwSEFBdUM7QUFDbEUsTUFBTUYsNkJBQTZCLENBQUNJO0lBQ2hDLElBQUksQ0FBQ0EsS0FBS0MsVUFBVSxDQUFDLFFBQVFDLFNBQXdDLEVBQUU7UUFDbkUsT0FBT0Y7SUFDWDtJQUNBLE1BQU0sRUFBRUssUUFBUSxFQUFHQyxLQUFLLEVBQ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1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/normalize-trailing-slash.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/client/on-recoverable-error.js": /*!***************************************************************!*\ !*** ./node_modules/next/dist/client/on-recoverable-error.js ***! \***************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return onRecoverableError;\n }\n}));\nconst _nossrerror = __webpack_require__(/*! ../shared/lib/lazy-dynamic/no-ssr-error */ \"(app-client)/./node_modules/next/dist/shared/lib/lazy-dynamic/no-ssr-error.js\");\nfunction onRecoverableError(err) {\n // Using default react onRecoverableError\n // x-ref: https://github.com/facebook/react/blob/d4bc16a7d69eb2ea38a88c8ac0b461d5f72cdcab/packages/react-dom/src/client/ReactDOMRoot.js#L83\n const defaultOnRecoverableError = typeof reportError === \"function\" ? reportError : (error)=>{\n window.console.error(error);\n };\n // Skip certain custom errors which are not expected to be reported on client\n if (err.digest === _nossrerror.NEXT_DYNAMIC_NO_SSR_CODE) return;\n defaultOnRecoverableError(err);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=on-recoverable-error.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvb24tcmVjb3ZlcmFibGUtZXJyb3IuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDJDQ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V0dXJuO1xuICAgIGRlZmF1bHRPblJlY292ZXJhYmxlRXJyb3IoZXJyKTtcbn1cblxuaWYgKCh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnZnVuY3Rpb24nIHx8ICh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9b24tcmVjb3ZlcmFibGUtZXJyb3IuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsIm9uUmVjb3ZlcmFibGVFcnJvciIsIl9ub3NzcmVycm9yIiwicmVxdWlyZSIsImVyciIsImRlZmF1bHRPblJlY292ZXJhYmxlRXJyb3IiLCJyZXBvcnRFcnJvciIsImVycm9yIiwid2luZG93IiwiY29uc29sZSIsImRpZ2VzdCIsIk5FWFRfRFlOQU1JQ19OT19TU1JfQ09ERSIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/client/on-recoverable-error.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/strip-ansi/index.js": /*!*************************************************************!*\ !*** ./node_modules/next/dist/compiled/strip-ansi/index.js ***! \*************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("var __dirname = \"/\";\n\n(()=>{\n \"use strict\";\n var e = {\n 511: (e)=>{\n e.exports = function() {\n let { onlyFirst: e = false } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const r = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"\n ].join(\"|\");\n return new RegExp(r, e ? undefined : \"g\");\n };\n },\n 532: (e, r, _)=>{\n const t = _(511);\n e.exports = (e)=>typeof e === \"string\" ? e.replace(t(), \"\") : e;\n }\n };\n var r = {};\n function __nccwpck_require__(_) {\n var t = r[_];\n if (t !== undefined) {\n return t.exports;\n }\n var a = r[_] = {\n exports: {}\n };\n var n = true;\n try {\n e[_](a, a.exports, __nccwpck_require__);\n n = false;\n } finally{\n if (n) delete r[_];\n }\n return a.exports;\n }\n if (typeof __nccwpck_require__ !== \"undefined\") __nccwpck_require__.ab = __dirname + \"/\";\n var _ = __nccwpck_require__(532);\n module.exports = _;\n})();\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9zdHJpcC1hbnNpL2luZGV4LmpzIiwibWFwcGluZ3MiOiI7O0FBQUM7SUFBSztJQUFhLElBQUlBLElBQUU7UUFBQyxLQUFJQSxDQUFBQTtZQUFJQSxFQUFFQyxPQUFPLEdBQUM7b0JBQUMsRUFBQ0MsV0FBVUYsSUFBRSxLQUFLLEVBQUMsb0VBQUMs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0cz1ffSkoKTsiXSwibmFtZXMiOlsiZSIsImV4cG9ydHMiLCJvbmx5Rmlyc3QiLCJyIiwiam9pbiIsIlJlZ0V4cCIsInVuZGVmaW5lZCIsIl8iLCJ0IiwicmVwbGFjZSIsIl9fbmNjd3Bja19yZXF1aXJlX18iLCJhIiwibiIsImFiIiwiX19kaXJuYW1lIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/strip-ansi/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js": /*!*****************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/app-router-context.js ***! \*****************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n CacheStates: function() {\n return CacheStates;\n },\n AppRouterContext: function() {\n return AppRouterContext;\n },\n LayoutRouterContext: function() {\n return LayoutRouterContext;\n },\n GlobalLayoutRouterContext: function() {\n return GlobalLayoutRouterContext;\n },\n TemplateContext: function() {\n return TemplateContext;\n }\n});\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nvar CacheStates;\n(function(CacheStates) {\n CacheStates[\"LAZY_INITIALIZED\"] = \"LAZYINITIALIZED\";\n CacheStates[\"DATA_FETCH\"] = \"DATAFETCH\";\n CacheStates[\"READY\"] = \"READY\";\n})(CacheStates || (CacheStates = {}));\nconst AppRouterContext = _react.default.createContext(null);\nconst LayoutRouterContext = _react.default.createContext(null);\nconst GlobalLayoutRouterContext = _react.default.createContext(null);\nconst TemplateContext = _react.default.createContext(null);\nif (true) {\n AppRouterContext.displayName = \"AppRouterContext\";\n LayoutRouterContext.displayName = \"LayoutRouterContext\";\n GlobalLayoutRouterContext.displayName = \"GlobalLayoutRouterContext\";\n TemplateContext.displayName = \"TemplateContext\";\n} //# sourceMappingURL=app-router-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2FwcC1yb3V0ZXItY29udGV4dC5qcyIsIm1hcHBpbmdzIjoicURBQ2E7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FNTjtBQUNBLFNBQVNNLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlaLE9BQU9DLGNBQWMsQ0FBQ1UsUUFBUUUsTUFBTTtRQUNwREMsWUFBWTtRQUNaQyxLQUFLSCxHQUFHLENBQUNDLEtBQUs7SUFDbEI7QUFDSjtBQUNBSCxRQUFRUixTQUFTO0lBQ2JHLGFBQWE7UUFDVCxPQUFPQTtJQUNYO0lBQ0FDLGtCQUFrQjtRQUNkLE9BQU9BO0lBQ1g7SUFDQUMscUJBQXFCO1FBQ2pCLE9BQU9BO0lBQ1g7SUFDQUMsMkJBQTJCO1FBQ3ZCLE9BQU9BO0lBQ1g7SUFDQUMsaUJBQWlCO1FBQ2IsT0FBT0E7SUFDWDtBQUNKO0FBQ0EsTUFBTU8sMkJBQTJCQyxtQkFBT0EsQ0FBQyx5SEFBeUM7QUFDbEYsTUFBTUMsU0FBUyxXQUFXLEdBQUdGLHlCQUF5QkcsQ0FBQyxDQUFDRixtQkFBT0EsQ0FBQyw0RUFBTztBQUV2RSxJQUFJWjtBQUNILFVB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uLy8jIHNvdXJjZU1hcHBpbmdVUkw9YXBwLXJvdXRlci1jb250ZXh0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsIkNhY2hlU3RhdGVzIiwiQXBwUm91dGVyQ29udGV4dCIsIkxheW91dFJvdXRlckNvbnRleHQiLCJHbG9iYWxMYXlvdXRSb3V0ZXJDb250ZXh0IiwiVGVtcGxhdGVDb250ZXh0IiwiX2V4cG9ydCIsInRhcmdldCIsImFsbCIsIm5hbWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0IiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJkZWZhdWx0IiwiY3JlYXRlQ29udGV4dCIsInByb2Nlc3MiLCJkaXNwbGF5TmFtZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/app-router-context.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/hash.js": /*!***************************************************!*\ !*** ./node_modules/next/dist/shared/lib/hash.js ***! \***************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// http://www.cse.yorku.ca/~oz/hash.html\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n djb2Hash: function() {\n return djb2Hash;\n },\n hexHash: function() {\n return hexHash;\n }\n});\nfunction djb2Hash(str) {\n let hash = 5381;\n for(let i = 0; i < str.length; i++){\n const char = str.charCodeAt(i);\n hash = (hash << 5) + hash + char;\n }\n return Math.abs(hash);\n}\nfunction hexHash(str) {\n return djb2Hash(str).toString(36).slice(0, 5);\n} //# sourceMappingURL=hash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-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1oYXNoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsImRqYjJIYXNoIiwiaGV4SGFzaCIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsInN0ciIsImhhc2giLCJpIiwibGVuZ3RoIiwiY2hhciIsImNoYXJDb2RlQXQiLCJNYXRoIiwiYWJzIiwidG9TdHJpbmciLCJzbGljZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/hash.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/head-manager-context.js": /*!*******************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/head-manager-context.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"HeadManagerContext\", ({\n enumerable: true,\n get: function() {\n return HeadManagerContext;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst HeadManagerContext = _react.default.createContext({});\nif (true) {\n HeadManagerContext.displayName = \"HeadManagerContext\";\n} //# sourceMappingURL=head-manager-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2hlYWQtbWFuYWdlci1jb250ZXh0LmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csT0FBTzt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ll8ocmVxdWlyZShcInJlYWN0XCIpKTtcbmNvbnN0IEhlYWRNYW5hZ2VyQ29udGV4dCA9IF9yZWFjdC5kZWZhdWx0LmNyZWF0ZUNvbnRleHQoe30pO1xuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikge1xuICAgIEhlYWRNYW5hZ2VyQ29udGV4dC5kaXNwbGF5TmFtZSA9IFwiSGVhZE1hbmFnZXJDb250ZXh0XCI7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWhlYWQtbWFuYWdlci1jb250ZXh0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJIZWFkTWFuYWdlckNvbnRleHQiLCJfaW50ZXJvcF9yZXF1aXJlX2RlZmF1bHQiLCJyZXF1aXJlIiwiX3JlYWN0IiwiXyIsImRlZmF1bHQiLCJjcmVhdGVDb250ZXh0IiwicHJvY2VzcyIsImRpc3BsYXlOYW1lIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/head-manager-context.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/hooks-client-context.js": /*!*******************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/hooks-client-context.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n SearchParamsContext: function() {\n return SearchParamsContext;\n },\n PathnameContext: function() {\n return PathnameContext;\n }\n});\nconst _react = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nconst SearchParamsContext = (0, _react.createContext)(null);\nconst PathnameContext = (0, _react.createContext)(null);\nif (true) {\n SearchParamsContext.displayName = \"SearchParamsContext\";\n PathnameContext.displayName = \"PathnameContext\";\n} //# sourceMappingURL=hooks-client-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2hvb2tzLWNsaWVudC1jb250ZXh0LmpzIiwibWFwcGluZ3MiOiJxREFDYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRixLQUFNQyxDQUFBQSxDQUdOO0FBQ0EsU0FBU0csUUFBUUMsTUFBTSxFQUFFQyxHQUFHO0lBQ3hCLElBQUksSUFBSUMsUUFBUUQsSUFBSVQsT0FBT0MsY0FBYyxDQUFDTyxRQUFRRSxNQUFNO1FBQ3BEQyxZQUFZO1FBQ1pDLEtBQUtILEdBQUcsQ0FBQ0MsS0FBSztJQUNsQjtBQUNKO0FBQ0FILFFBQVFMLFNBQVM7SUFDYkcscUJBQXFCO1FBQ2pCLE9BQU9BO0lBQ1g7SUFDQUMsaUJBQWlCO1FBQ2IsT0FBT0E7SUFDWDtBQUNKO0FBQ0EsTUFBTU8sU0FBU0MsbUJBQU9BLENBQUMsNEVBQU87QUFFOUIsTUFBTVQsc0JBQXNCLENBQUMsR0FBR1EsT0FBT0UsYUFBYSxFQUFFO0FBQ3RELE1BQU1ULGtCQUFrQixDQUFDLEdBQUdPLE9BQU9FLGFBQWEsRUFBRTtBQUNsRCxJQUFJQyxJQUFxQyxFQUFFO0lBQ3ZDWCxvQkFBb0JZLFdBQVcsR0FBRztJQUNsQ1gsZ0JBQWdCVyxXQUFXLEdBQUc7QUFDbEMsRUFFQSxnREFBZ0QiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4vbm9kZV9tb2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XCIpIHtcbiAgICBTZWFyY2hQYXJhbXNDb250ZXh0LmRpc3BsYXlOYW1lID0gXCJTZWFyY2hQYXJhbXNDb250ZXh0XCI7XG4gICAgUGF0aG5hbWVDb250ZXh0LmRpc3BsYXlOYW1lID0gXCJQYXRobmFtZUNvbnRleHRcIjtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aG9va3MtY2xpZW50LWNvbnRleHQuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwibW9kdWxlIiwiU2VhcmNoUGFyYW1zQ29udGV4dCIsIlBhdGhuYW1lQ29udGV4dCIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9yZWFjdCIsInJlcXVpcmUiLCJjcmVhdGVDb250ZXh0IiwicHJvY2VzcyIsImRpc3BsYXlOYW1lIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/hooks-client-context.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/lazy-dynamic/no-ssr-error.js": /*!************************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/lazy-dynamic/no-ssr-error.js ***! \************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("// This has to be a shared module which is shared between client component error boundary and dynamic component\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"NEXT_DYNAMIC_NO_SSR_CODE\", ({\n enumerable: true,\n get: function() {\n return NEXT_DYNAMIC_NO_SSR_CODE;\n }\n}));\nconst NEXT_DYNAMIC_NO_SSR_CODE = \"NEXT_DYNAMIC_NO_SSR_CODE\"; //# sourceMappingURL=no-ssr-error.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllb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PW5vLXNzci1lcnJvci5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiTkVYVF9EWU5BTUlDX05PX1NTUl9DT0RFIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/lazy-dynamic/no-ssr-error.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js": /*!*****************************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js ***! \*****************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"ensureLeadingSlash\", ({\n enumerable: true,\n get: function() {\n return ensureLeadingSlash;\n }\n}));\nfunction ensureLeadingSlash(path) {\n return path.startsWith(\"/\") ? path : \"/\" + path;\n} //# sourceMappingURL=ensure-leading-slash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3BhZ2UtcGF0aC9lbnN1cmUtbGVhZGluZy1zbGFzaC5qcyIsIm1hcHBpbmdzIjoiQUFBQTs7O0NBR0MsR0FBZ0I7QUFDakJBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCxzREFBcUQ7SUFDakRJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixTQUFTQSxtQkFBbUJDLElBQUk7SUFDNUIsT0FBT0EsS0FBS0MsVUFBVSxDQU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CIsInBhdGgiLCJzdGFydHNXaXRoIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js": /*!***************************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js ***! \***************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"addPathPrefix\", ({\n enumerable: true,\n get: function() {\n return addPathPrefix;\n }\n}));\nconst _parsepath = __webpack_require__(/*! ./parse-path */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nfunction addPathPrefix(path, prefix) {\n if (!path.startsWith(\"/\") || !prefix) {\n return path;\n }\n const { pathname, query, hash } = (0, _parsepath.parsePath)(path);\n return \"\" + prefix + pathname + query + hash;\n} //# sourceMappingURL=add-path-prefix.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9hZGQtcGF0aC1wcmVmaXguanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILGlEQUFnRDtJQUM1Q0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLGFBQWFDLG1CQUFPQSxDQUFDLGlHQUFjO0FBQ3pDLFNBQVNGLGNBQWNHLElBQUksRUFBRUMsTUFBTTtJQUMvQixJQUFJLENBQUNELEtBQUtFLFVBQVUsQ0FBQyxRQUFRLENBQUNELFFBQVE7UU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mNlTWFwcGluZ1VSTD1hZGQtcGF0aC1wcmVmaXguanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsImFkZFBhdGhQcmVmaXgiLCJfcGFyc2VwYXRoIiwicmVxdWlyZSIsInBhdGgiLCJwcmVmaXgiLCJzdGFydHNXaXRoIiwicGF0aG5hbWUiLCJxdWVyeSIsImhhc2giLCJwYXJzZVBhdGgiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/router/utils/app-paths.js": /*!*********************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/router/utils/app-paths.js ***! \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n normalizeAppPath: function() {\n return normalizeAppPath;\n },\n normalizeRscPath: function() {\n return normalizeRscPath;\n }\n});\nconst _ensureleadingslash = __webpack_require__(/*! ../../page-path/ensure-leading-slash */ \"(app-client)/./node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js\");\nfunction normalizeAppPath(route) {\n return (0, _ensureleadingslash.ensureLeadingSlash)(route.split(\"/\").reduce((pathname, segment, index, segments)=>{\n // Empty segments are ignored.\n if (!segment) {\n return pathname;\n }\n // Groups are ignored.\n if (segment[0] === \"(\" && segment.endsWith(\")\")) {\n return pathname;\n }\n // Parallel segments are ignored.\n if (segment[0] === \"@\") {\n return pathname;\n }\n // The last segment (if it's a leaf) should be ignored.\n if ((segment === \"page\" || segment === \"route\") && index === segments.length - 1) {\n return pathname;\n }\n return pathname + \"/\" + segment;\n }, \"\"));\n}\nfunction normalizeRscPath(pathname, enabled) {\n return enabled ? pathname.replace(/\\.rsc($|\\?)/, \"$1\") : pathname;\n} //# sourceMappingURL=app-paths.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9hcHAtcGF0aHMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0YsS0FBTUMsQ0FBQUEsQ0FHTjtBQUNBLFNBQVNHLFFBQVFDLE1BQU0sRUFBRUMsR0FBRztJQUN4QixJQUFJLElBQUlDLFFBQVFELElBQUlULE9BQU9DLGNBQWMsQ0FBQ08sUUFBUUUsTUFBTTtRQUNwREMsWUFBWTtRQUNaQyxLQUFLSCxHQUFHLENBQUNDLEtBQUs7SUFDbEI7QUFDSjtBQUNBSCxRQUFRTCxTQUFTO0lBQ2JHLGtCQUFrQjtRQUNkLE9BQU9BO0lBQ1g7SUFDQUMsa0JBQWtCO1FBQ2QsT0FBT0E7SUFDWDtBQUNKO0FBQ0EsTUFBTU8sc0JBQXNCQyxtQkFBT0EsQ0FBQyxnSUFBc0M7QUFDMUUsU0FBU1QsaUJBQWlCVSxLQUFLO0lBQzNCLE9BQU8sQ0FBQyxHQUFHRixvQkFBb0JHLGtCQUFrQixFQUFFRCxNQUFNRSxLQUFLLENBQUMsS0FBS0MsTUFBTSxDQUFDLENBQUNDLFVBQVVDLFNBQVNDLE9BQU9DO1FBQ2xHLDhCQUE4QjtRQUM5QixJQUFJLENBQUNGLFNBQVM7WUFDVixPQUFPRDtRQUNYO1FBQ0Esc0JBQXNCO1FBQ3RCLElBQUlDLE9BQU8sQ0FBQyxFQUFFLEtBQUssT0FBT0EsUUFBUUcsUUFBUSxDQUFDLE1BQU07WUF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gICAgaWYgKChzZWdtZW50ID09PSBcInBhZ2VcIiB8fCBzZWdtZW50ID09PSBcInJvdXRlXCIpICYmIGluZGV4ID09PSBzZWdtZW50cy5sZW5ndGggLSAxKSB7XG4gICAgICAgICAgICByZXR1cm4gcGF0aG5hbWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHBhdGhuYW1lICsgXCIvXCIgKyBzZWdtZW50O1xuICAgIH0sIFwiXCIpKTtcbn1cbmZ1bmN0aW9uIG5vcm1hbGl6ZVJzY1BhdGgocGF0aG5hbWUsIGVuYWJsZWQpIHtcbiAgICByZXR1cm4gZW5hYmxlZCA/IHBhdGhuYW1lLnJlcGxhY2UoL1xcLnJzYygkfFxcPykvLCAvLyAkMSBlbnN1cmVzIGA/YCBpcyBwcmVzZXJ2ZWRcbiAgICBcIiQxXCIpIDogcGF0aG5hbWU7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFwcC1wYXRocy5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJtb2R1bGUiLCJub3JtYWxpemVBcHBQYXRoIiwibm9ybWFsaXplUnNjUGF0aCIsIl9leHBvcnQiLCJ0YXJnZXQiLCJhbGwiLCJuYW1lIiwiZW51bWVyYWJsZSIsImdldCIsIl9lbnN1cmVsZWFkaW5nc2xhc2giLCJyZXF1aXJlIiwicm91dGUiLCJlbnN1cmVMZWFkaW5nU2xhc2giLCJzcGxpdCIsInJlZHVjZSIsInBhdGhuYW1lIiwic2VnbWVudCIsImluZGV4Iiwic2VnbWVudHMiLCJlbmRzV2l0aCIsImxlbmd0aCIsImVuYWJsZWQiLCJyZXBsYWNlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/router/utils/app-paths.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/router/utils/is-bot.js": /*!******************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/router/utils/is-bot.js ***! \******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"isBot\", ({\n enumerable: true,\n get: function() {\n return isBot;\n }\n}));\nfunction isBot(userAgent) {\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(userAgent);\n} //# sourceMappingURL=is-bot.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9pcy1ib3QuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILHlDQUF3QztJQUNwQ0ksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLFNBQVNBLE1BQU1DLFNBQVM7SUFDcEIsT0FBTyxvVkFBb1ZDLElBQUksQ0FBQ0Q7QUFDcFcsRUFFQSxrQ0FBa0MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9pcy1ib3QuanM/MDcxNSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcImlzQm90XCIsIHtcbiAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiBpc0JvdDtcbiAgICB9XG59KTtcbmZ1bmN0aW9uIGlzQm90KHVzZXJBZ2VudCkge1xuICAgIHJldHVybiAvR29vZ2xlYm90fE1lZGlhcGFydG5lcnMtR29vZ2xlfEFkc0JvdC1Hb29nbGV8Z29vZ2xld2VibGlnaHR8U3RvcmVib3QtR29vZ2xlfEdvb2dsZS1QYWdlUmVuZGVyZXJ8QmluZ2JvdHxCaW5nUHJldmlld3xTbHVycHxEdWNrRHVja0JvdHxiYWlkdXNwaWRlcnx5YW5kZXh8c29nb3V8TGlua2VkSW5Cb3R8Yml0bHlib3R8dHVtYmxyfHZrU2hhcmV8cXVvcmEgbGluayBwcmV2aWV3fGZhY2Vib29rZXh0ZXJuYWxoaXR8ZmFjZWJvb2tjYXRhbG9nfFR3aXR0ZXJib3R8YXBwbGVib3R8cmVkZGl0Ym90fFNsYWNrYm90fERpc2NvcmRib3R8V2hhdHNBcHB8U2t5cGVVcmlQcmV2aWV3fGlhX2FyY2hpdmVyL2kudGVzdCh1c2VyQWdlbnQpO1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1pcy1ib3QuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZW51bWVyYWJsZSIsImdldCIsImlzQm90IiwidXNlckFnZW50IiwidGVzdCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/router/utils/is-bot.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/router/utils/parse-path.js": /*!**********************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/router/utils/parse-path.js ***! \**********************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"parsePath\", ({\n enumerable: true,\n get: function() {\n return parsePath;\n }\n}));\nfunction parsePath(path) {\n const hashIndex = path.indexOf(\"#\");\n const queryIndex = path.indexOf(\"?\");\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : \"\",\n hash: hashIndex > -1 ? path.slice(hashIndex) : \"\"\n };\n }\n return {\n pathname: path,\n query: \"\",\n hash: \"\"\n };\n} //# sourceMappingURL=parse-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9wYXJzZS1wYXRoLmpzIiwibWFwcGluZ3MiOiJBQUFBOzs7O0NBSUMsR0FBZ0I7QUFDakJBLDhDQUE2QztJQUN6Q0csT0FBTztBQUNYLENBQUMsRUFBQztBQUNGSCw2Q0FBNEM7SUFDeENJLFlBQVk7SUFDWkMsS0FBSztRQUNELE9BQU9DO0lBQ1g7QUFDSixDQUFDLEVBQUM7QUFDRixTQUFTQSxVQUFVQyxJQUFJO0lBQ25CLE1BQU1DLFlBQVlELEtBQUtFLE9BQU8sQ0FBQztJQUMvQixNQUFNQyxhQUFhSCxLQUFLRSxPQUFPLENBQUM7SUFDaEMsTUFBTUUsV0FBV0QsYUFBYSxDQUFDLEtBQU1GL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iLCJoYXNoSW5kZXgiLCJpbmRleE9mIiwicXVlcnlJbmRleCIsImhhc1F1ZXJ5IiwicGF0aG5hbWUiLCJzdWJzdHJpbmciLCJxdWVyeSIsInVuZGVmaW5lZCIsImhhc2giLCJzbGljZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/router/utils/parse-path.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js": /*!*********************************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js ***! \*********************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"removeTrailingSlash\", ({\n enumerable: true,\n get: function() {\n return removeTrailingSlash;\n }\n}));\nfunction removeTrailingSlash(route) {\n return route.replace(/\\/$/, \"\") || \"/\";\n} //# sourceMappingURL=remove-trailing-slash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9yZW1vdmUtdHJhaWxpbmctc2xhc2guanMiLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztDQU1DLEdBQWdCO0FBQ2pCQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsdURBQXNEO0lBQ2xESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQyxFQUFDO0FBQ0YsU0FBU0Esb0JBQW9CQyxLQUFLO0lBQzlCLE9BQU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hbHVlIiwiZW51bWVyYWJsZSIsImdldCIsInJlbW92ZVRyYWlsaW5nU2xhc2giLCJyb3V0ZSIsInJlcGxhY2UiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/shared/lib/server-inserted-html.js": /*!*******************************************************************!*\ !*** ./node_modules/next/dist/shared/lib/server-inserted-html.js ***! \*******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ServerInsertedHTMLContext: function() {\n return ServerInsertedHTMLContext;\n },\n useServerInsertedHTML: function() {\n return useServerInsertedHTML;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\"));\nconst ServerInsertedHTMLContext = /*#__PURE__*/ _react.default.createContext(null);\nfunction useServerInsertedHTML(callback) {\n const addInsertedServerHTMLCallback = (0, _react.useContext)(ServerInsertedHTMLContext);\n // Should have no effects on client where there's no flush effects provider\n if (addInsertedServerHTMLCallback) {\n addInsertedServerHTMLCallback(callback);\n }\n} //# sourceMappingURL=server-inserted-html.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3NlcnZlci1pbnNlcnRlZC1odG1sLmpzIiwibWFwcGluZ3MiOiJ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ZGRJbnNlcnRlZFNlcnZlckhUTUxDYWxsYmFjayA9ICgwLCBfcmVhY3QudXNlQ29udGV4dCkoU2VydmVySW5zZXJ0ZWRIVE1MQ29udGV4dCk7XG4gICAgLy8gU2hvdWxkIGhhdmUgbm8gZWZmZWN0cyBvbiBjbGllbnQgd2hlcmUgdGhlcmUncyBubyBmbHVzaCBlZmZlY3RzIHByb3ZpZGVyXG4gICAgaWYgKGFkZEluc2VydGVkU2VydmVySFRNTENhbGxiYWNrKSB7XG4gICAgICAgIGFkZEluc2VydGVkU2VydmVySFRNTENhbGxiYWNrKGNhbGxiYWNrKTtcbiAgICB9XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNlcnZlci1pbnNlcnRlZC1odG1sLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm1vZHVsZSIsIlNlcnZlckluc2VydGVkSFRNTENvbnRleHQiLCJ1c2VTZXJ2ZXJJbnNlcnRlZEhUTUwiLCJfZXhwb3J0IiwidGFyZ2V0IiwiYWxsIiwibmFtZSIsImVudW1lcmFibGUiLCJnZXQiLCJfaW50ZXJvcF9yZXF1aXJlX3dpbGRjYXJkIiwicmVxdWlyZSIsIl9yZWFjdCIsIl8iLCJkZWZhdWx0IiwiY3JlYXRlQ29udGV4dCIsImNhbGxiYWNrIiwiYWRkSW5zZXJ0ZWRTZXJ2ZXJIVE1MQ2FsbGJhY2siLCJ1c2VDb250ZXh0Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/shared/lib/server-inserted-html.js\n")); /***/ }), /***/ "(sc_shared)/./node_modules/next/dist/client/components/async-local-storage.js": /*!*************************************************************************!*\ !*** ./node_modules/next/dist/client/components/async-local-storage.js ***! \*************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"createAsyncLocalStorage\", ({\n enumerable: true,\n get: function() {\n return createAsyncLocalStorage;\n }\n}));\nconst sharedAsyncLocalStorageNotAvailableError = new Error(\"Invariant: AsyncLocalStorage accessed in runtime where it is not available\");\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n}\nconst maybeGlobalAsyncLocalStorage = globalThis.AsyncLocalStorage;\nfunction createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=async-local-storage.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNjX3NoYXJlZCkvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NsaWVudC9jb21wb25lbnRzL2FzeW5jLWxvY2FsLXN0b3JhZ2UuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxPQUFPO0FBQ1gsQ0FBQyxFQUFDO0FBQ0ZILDJEQUEwRDtJQUN0REksWUFBWTtJQUNaQyxLQUFLO1FBQ0QsT0FBT0M7SUFDWDtBQUNKLENBQUMsRUFBQztBQUNGLE1BQU1DLDJDQUEyQyxJQUFJQyxNQUFNO0FBQzNELE1BQU1DO0lBQ0ZDLFVBQVU7UUFDTixNQUFNSDtJQ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ldpdGgiLCJtYXliZUdsb2JhbEFzeW5jTG9jYWxTdG9yYWdlIiwiZ2xvYmFsVGhpcyIsIkFzeW5jTG9jYWxTdG9yYWdlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(sc_shared)/./node_modules/next/dist/client/components/async-local-storage.js\n")); /***/ }), /***/ "(sc_shared)/./node_modules/next/dist/client/components/request-async-storage.js": /*!***************************************************************************!*\ !*** ./node_modules/next/dist/client/components/request-async-storage.js ***! \***************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"requestAsyncStorage\", ({\n enumerable: true,\n get: function() {\n return requestAsyncStorage;\n }\n}));\nconst _asynclocalstorage = __webpack_require__(/*! ./async-local-storage */ \"(sc_shared)/./node_modules/next/dist/client/components/async-local-storage.js\");\nconst requestAsyncStorage = (0, _asynclocalstorage.createAsyncLocalStorage)();\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=request-async-storage.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNjX3NoYXJlZCkvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NsaWVudC9jb21wb25lbnRzL3JlcXVlc3QtYXN5bmMtc3RvcmFnZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLE9BQU87QUFDWCxDQUFDLEVBQUM7QUFDRkgsdURBQXNEO0lBQ2xESSxZQUFZO0lBQ1pDLEtBQUs7UUFDRCxPQUFPQztJQUNYO0FBQ0osQ0FBQy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sLXN0b3JhZ2VcIik7XG5jb25zdCByZXF1ZXN0QXN5bmNTdG9yYWdlID0gKDAsIF9hc3luY2xvY2Fsc3RvcmFnZS5jcmVhdGVBc3luY0xvY2FsU3RvcmFnZSkoKTtcblxuaWYgKCh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnZnVuY3Rpb24nIHx8ICh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVxdWVzdC1hc3luYy1zdG9yYWdlLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJyZXF1ZXN0QXN5bmNTdG9yYWdlIiwiX2FzeW5jbG9jYWxzdG9yYWdlIiwicmVxdWlyZSIsImNyZWF0ZUFzeW5jTG9jYWxTdG9yYWdlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(sc_shared)/./node_modules/next/dist/client/components/request-async-storage.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js": /*!***********************************************************************************!*\ !*** ./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js ***! \***********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst runtime_1 = __importDefault(__webpack_require__(/*! next/dist/compiled/react-refresh/runtime */ \"(app-client)/./node_modules/next/dist/compiled/react-refresh/runtime.js\"));\nconst helpers_1 = __importDefault(__webpack_require__(/*! ./internal/helpers */ \"(app-client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js\"));\n// Hook into ReactDOM initialization\nruntime_1.default.injectIntoGlobalHook(self);\n// Register global helpers\nself.$RefreshHelpers$ = helpers_1.default;\n// Register a helper for module execution interception\nself.$RefreshInterceptModuleExecution$ = function (webpackModuleId) {\n var prevRefreshReg = self.$RefreshReg$;\n var prevRefreshSig = self.$RefreshSig$;\n self.$RefreshReg$ = function (type, id) {\n runtime_1.default.register(type, webpackModuleId + ' ' + id);\n };\n self.$RefreshSig$ = runtime_1.default.createSignatureFunctionForTransform;\n // Modeled after `useEffect` cleanup pattern:\n // https://react.dev/learn/synchronizing-with-effects#step-3-add-cleanup-if-needed\n return function () {\n self.$RefreshReg$ = prevRefreshReg;\n self.$RefreshSig$ = prevRefreshSig;\n };\n};\n//# sourceMappingURL=runtime.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9AbmV4dC9yZWFjdC1yZWZyZXNoLXV0aWxzL2Rpc3QvcnVudGltZS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiO0FBQ0EsNkNBQTZDO0FBQzdDO0FBQ0EsOENBQTZDLEVBQUUsYUFBYSxFQUFD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client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/anser/index.js": /*!********************************************************!*\ !*** ./node_modules/next/dist/compiled/anser/index.js ***! \********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { eval(__webpack_require__.ts("var __dirname = \"/\";\n(()=>{\"use strict\";var e={211:e=>{var r=function(){function defineProperties(e,r){for(var n=0;n<r.length;n++){var s=r[n];s.enumerable=s.enumerable||false;s.configurable=true;if(\"value\"in s)s.writable=true;Object.defineProperty(e,s.key,s)}}return function(e,r,n){if(r)defineProperties(e.prototype,r);if(n)defineProperties(e,n);return e}}();function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError(\"Cannot call a class as a function\")}}var n=[[{color:\"0, 0, 0\",class:\"ansi-black\"},{color:\"187, 0, 0\",class:\"ansi-red\"},{color:\"0, 187, 0\",class:\"ansi-green\"},{color:\"187, 187, 0\",class:\"ansi-yellow\"},{color:\"0, 0, 187\",class:\"ansi-blue\"},{color:\"187, 0, 187\",class:\"ansi-magenta\"},{color:\"0, 187, 187\",class:\"ansi-cyan\"},{color:\"255,255,255\",class:\"ansi-white\"}],[{color:\"85, 85, 85\",class:\"ansi-bright-black\"},{color:\"255, 85, 85\",class:\"ansi-bright-red\"},{color:\"0, 255, 0\",class:\"ansi-bright-green\"},{color:\"255, 255, 85\",class:\"ansi-bright-yellow\"},{color:\"85, 85, 255\",class:\"ansi-bright-blue\"},{color:\"255, 85, 255\",class:\"ansi-bright-magenta\"},{color:\"85, 255, 255\",class:\"ansi-bright-cyan\"},{color:\"255, 255, 255\",class:\"ansi-bright-white\"}]];var s=function(){r(Anser,null,[{key:\"escapeForHtml\",value:function escapeForHtml(e){return(new Anser).escapeForHtml(e)}},{key:\"linkify\",value:function linkify(e){return(new Anser).linkify(e)}},{key:\"ansiToHtml\",value:function ansiToHtml(e,r){return(new Anser).ansiToHtml(e,r)}},{key:\"ansiToJson\",value:function ansiToJson(e,r){return(new Anser).ansiToJson(e,r)}},{key:\"ansiToText\",value:function ansiToText(e){return(new Anser).ansiToText(e)}}]);function Anser(){_classCallCheck(this,Anser);this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null;this.bright=0}r(Anser,[{key:\"setupPalette\",value:function setupPalette(){this.PALETTE_COLORS=[];for(var e=0;e<2;++e){for(var r=0;r<8;++r){this.PALETTE_COLORS.push(n[e][r].color)}}var s=[0,95,135,175,215,255];var i=function format(e,r,n){return s[e]+\", \"+s[r]+\", \"+s[n]};var t=void 0,o=void 0,a=void 0;for(var l=0;l<6;++l){for(var c=0;c<6;++c){for(var u=0;u<6;++u){this.PALETTE_COLORS.push(i(l,c,u))}}}var f=8;for(var h=0;h<24;++h,f+=10){this.PALETTE_COLORS.push(i(f,f,f))}}},{key:\"escapeForHtml\",value:function escapeForHtml(e){return e.replace(/[&<>]/gm,(function(e){return e==\"&\"?\"&\":e==\"<\"?\"<\":e==\">\"?\">\":\"\"}))}},{key:\"linkify\",value:function linkify(e){return e.replace(/(https?:\\/\\/[^\\s]+)/gm,(function(e){return'<a href=\"'+e+'\">'+e+\"</a>\"}))}},{key:\"ansiToHtml\",value:function ansiToHtml(e,r){return this.process(e,r,true)}},{key:\"ansiToJson\",value:function ansiToJson(e,r){r=r||{};r.json=true;r.clearLine=false;return this.process(e,r,true)}},{key:\"ansiToText\",value:function ansiToText(e){return this.process(e,{},false)}},{key:\"process\",value:function process(e,r,n){var s=this;var i=this;var t=e.split(/\\033\\[/);var o=t.shift();if(r===undefined||r===null){r={}}r.clearLine=/\\r/.test(e);var a=t.map((function(e){return s.processChunk(e,r,n)}));if(r&&r.json){var l=i.processChunkJson(\"\");l.content=o;l.clearLine=r.clearLine;a.unshift(l);if(r.remove_empty){a=a.filter((function(e){return!e.isEmpty()}))}return a}else{a.unshift(o)}return a.join(\"\")}},{key:\"processChunkJson\",value:function processChunkJson(e,r,s){r=typeof r==\"undefined\"?{}:r;var i=r.use_classes=typeof r.use_classes!=\"undefined\"&&r.use_classes;var t=r.key=i?\"class\":\"color\";var o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,clearLine:r.clearLine,decoration:null,was_processed:false,isEmpty:function isEmpty(){return!o.content}};var a=e.match(/^([!\\x3c-\\x3f]*)([\\d;]*)([\\x20-\\x2c]*[\\x40-\\x7e])([\\s\\S]*)/m);if(!a)return o;var l=o.content=a[4];var c=a[2].split(\";\");if(a[1]!==\"\"||a[3]!==\"m\"){return o}if(!s){return o}var u=this;u.decoration=null;while(c.length>0){var f=c.shift();var h=parseInt(f);if(isNaN(h)||h===0){u.fg=u.bg=u.decoration=null}else if(h===1){u.decoration=\"bold\"}else if(h===2){u.decoration=\"dim\"}else if(h==3){u.decoration=\"italic\"}else if(h==4){u.decoration=\"underline\"}else if(h==5){u.decoration=\"blink\"}else if(h===7){u.decoration=\"reverse\"}else if(h===8){u.decoration=\"hidden\"}else if(h===9){u.decoration=\"strikethrough\"}else if(h==39){u.fg=null}else if(h==49){u.bg=null}else if(h>=30&&h<38){u.fg=n[0][h%10][t]}else if(h>=90&&h<98){u.fg=n[1][h%10][t]}else if(h>=40&&h<48){u.bg=n[0][h%10][t]}else if(h>=100&&h<108){u.bg=n[1][h%10][t]}else if(h===38||h===48){var p=h===38;if(c.length>=1){var g=c.shift();if(g===\"5\"&&c.length>=1){var v=parseInt(c.shift());if(v>=0&&v<=255){if(!i){if(!this.PALETTE_COLORS){u.setupPalette()}if(p){u.fg=this.PALETTE_COLORS[v]}else{u.bg=this.PALETTE_COLORS[v]}}else{var d=v>=16?\"ansi-palette-\"+v:n[v>7?1:0][v%8][\"class\"];if(p){u.fg=d}else{u.bg=d}}}}else if(g===\"2\"&&c.length>=3){var _=parseInt(c.shift());var b=parseInt(c.shift());var y=parseInt(c.shift());if(_>=0&&_<=255&&b>=0&&b<=255&&y>=0&&y<=255){var k=_+\", \"+b+\", \"+y;if(!i){if(p){u.fg=k}else{u.bg=k}}else{if(p){u.fg=\"ansi-truecolor\";u.fg_truecolor=k}else{u.bg=\"ansi-truecolor\";u.bg_truecolor=k}}}}}}}if(u.fg===null&&u.bg===null&&u.decoration===null){return o}else{var T=[];var m=[];var w={};o.fg=u.fg;o.bg=u.bg;o.fg_truecolor=u.fg_truecolor;o.bg_truecolor=u.bg_truecolor;o.decoration=u.decoration;o.was_processed=true;return o}}},{key:\"processChunk\",value:function processChunk(e,r,n){var s=this;var i=this;r=r||{};var t=this.processChunkJson(e,r,n);if(r.json){return t}if(t.isEmpty()){return\"\"}if(!t.was_processed){return t.content}var o=r.use_classes;var a=[];var l=[];var c={};var u=function render_data(e){var r=[];var n=void 0;for(n in e){if(e.hasOwnProperty(n)){r.push(\"data-\"+n+'=\"'+s.escapeForHtml(e[n])+'\"')}}return r.length>0?\" \"+r.join(\" \"):\"\"};if(t.fg){if(o){l.push(t.fg+\"-fg\");if(t.fg_truecolor!==null){c[\"ansi-truecolor-fg\"]=t.fg_truecolor;t.fg_truecolor=null}}else{a.push(\"color:rgb(\"+t.fg+\")\")}}if(t.bg){if(o){l.push(t.bg+\"-bg\");if(t.bg_truecolor!==null){c[\"ansi-truecolor-bg\"]=t.bg_truecolor;t.bg_truecolor=null}}else{a.push(\"background-color:rgb(\"+t.bg+\")\")}}if(t.decoration){if(o){l.push(\"ansi-\"+t.decoration)}else if(t.decoration===\"bold\"){a.push(\"font-weight:bold\")}else if(t.decoration===\"dim\"){a.push(\"opacity:0.5\")}else if(t.decoration===\"italic\"){a.push(\"font-style:italic\")}else if(t.decoration===\"reverse\"){a.push(\"filter:invert(100%)\")}else if(t.decoration===\"hidden\"){a.push(\"visibility:hidden\")}else if(t.decoration===\"strikethrough\"){a.push(\"text-decoration:line-through\")}else{a.push(\"text-decoration:\"+t.decoration)}}if(o){return'<span class=\"'+l.join(\" \")+'\"'+u(c)+\">\"+t.content+\"</span>\"}else{return'<span style=\"'+a.join(\";\")+'\"'+u(c)+\">\"+t.content+\"</span>\"}}}]);return Anser}();e.exports=s}};var r={};function __nccwpck_require__(n){var s=r[n];if(s!==undefined){return s.exports}var i=r[n]={exports:{}};var t=true;try{e[n](i,i.exports,__nccwpck_require__);t=false}finally{if(t)delete r[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n=__nccwpck_require__(211);module.exports=n})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9hbnNlci9pbmRleC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEsTUFBTSxhQUFhLE9BQU8sUUFBUSxpQkFBaUIsK0JBQStCLFlBQVksV0FBVyxLQUFLLFdBQVcsaUNBQWlDLG9CQUFvQiwrQkFBK0Isa0NBQWtDLHVCQUF1QixxQ0FBcUMsMkJBQTJCLFVBQVUsR0FBRyw4QkFBOEIsc0JBQXNCLDBEQUEwRCxTQUFTLG1DQUFtQyxFQUFFLG1DQUFtQyxFQUFFLHFDQUFxQyxFQUFFLHdDQUF3QyxFQUFFLG9DQUFvQyxFQUFFLHlDQUF5QyxFQUFFLHNDQUFzQyxFQUFFLHVDQUF1QyxJQUFJLDZDQUE2QyxFQUFFLDRDQUE0QyxFQUFFLDRDQUE0QyxFQUFFLGdEQUFnRCxFQUFFLDZDQUE2QyxFQUFFLGlEQUFpRCxFQUFFLDhDQUE4QyxFQUFFLGdEQUFnRCxHQUFHLGlCQUFpQixlQUFlLG9EQUFvRCxvQ0FBb0MsRUFBRSx3Q0FBd0MsOEJBQThCLEVBQUUsZ0RBQWdELG1DQUFtQyxFQUFFLGdEQUFnRCxtQ0FBbUMsRUFBRSw4Q0FBOEMsaUNBQWlDLEdBQUcsaUJBQWlCLDRCQUE0Qix5REFBeUQsY0FBYyxVQUFVLGlEQUFpRCx1QkFBdUIsWUFBWSxJQUFJLEtBQUssWUFBWSxJQUFJLEtBQUsseU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3Bja19yZXF1aXJlX18hPT1cInVuZGVmaW5lZFwiKV9fbmNjd3Bja19yZXF1aXJlX18uYWI9X19kaXJuYW1lK1wiL1wiO3ZhciBuPV9fbmNjd3Bja19yZXF1aXJlX18oMjExKTttb2R1bGUuZXhwb3J0cz1ufSkoKTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/anser/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/css.escape/css.escape.js": /*!******************************************************************!*\ !*** ./node_modules/next/dist/compiled/css.escape/css.escape.js ***! \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { eval(__webpack_require__.ts("var __dirname = \"/\";\n(()=>{var e={553:function(e){(function(r,t){if(true){e.exports=t(r)}else{}})(typeof __webpack_require__.g!=\"undefined\"?__webpack_require__.g:this,(function(e){if(e.CSS&&e.CSS.escape){return e.CSS.escape}var cssEscape=function(e){if(arguments.length==0){throw new TypeError(\"`CSS.escape` requires an argument.\")}var r=String(e);var t=r.length;var n=-1;var a;var i=\"\";var u=r.charCodeAt(0);while(++n<t){a=r.charCodeAt(n);if(a==0){i+=\"�\";continue}if(a>=1&&a<=31||a==127||n==0&&a>=48&&a<=57||n==1&&a>=48&&a<=57&&u==45){i+=\"\\\\\"+a.toString(16)+\" \";continue}if(n==0&&t==1&&a==45){i+=\"\\\\\"+r.charAt(n);continue}if(a>=128||a==45||a==95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){i+=r.charAt(n);continue}i+=\"\\\\\"+r.charAt(n)}return i};if(!e.CSS){e.CSS={}}e.CSS.escape=cssEscape;return cssEscape}))}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var a=r[t]={exports:{}};var i=true;try{e[t].call(a.exports,a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(553);module.exports=t})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9jc3MuZXNjYXBlL2Nzcy5lc2NhcGUuanMiLCJtYXBwaW5ncyI6IjtBQUFBLE1BQU0sT0FBTyxnQkFBZ0IsZUFBZSxHQUFHLElBQUksRUFBRSxlQUFlLElBQUksRUFBRSxDQUFDLFNBQVMscUJBQU0sY0FBYyxxQkFBTSxtQkFBbUIsd0JBQXdCLG9CQUFvQiwwQkFBMEIsd0JBQXdCLDBEQUEwRCxnQkFBZ0IsZUFBZSxTQUFTLE1BQU0sU0FBUyxzQkFBc0IsYUFBYSxrQkFBa0IsU0FBUyxPQUFPLFNBQVMsdUVBQXVFLDJCQUEyQixTQUFTLHNCQUFzQixvQkFBb0IsU0FBUyxvRUFBb0UsZUFBZSxTQUFTLG9CQUFvQixVQUFVLFdBQVcsU0FBUyx1QkFBdUIsaUJBQWlCLEtBQUssU0FBUyxnQ0FBZ0MsV0FBVyxrQkFBa0IsaUJBQWlCLFlBQVksWUFBWSxXQUFXLElBQUkscURBQXFELFFBQVEsUUFBUSxpQkFBaUIsaUJBQWlCLG1FQUFtRSxTQUFTLEtBQUssK0JBQStCLGlCQUFpQiIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL2Nzcy5lc2NhcGUvY3NzLmVzY2FwZS5qcz9hM2JjIl0sInNvdXJjZXNDb250ZW50IjpbIigoKT0+e3ZhciBlPXs1NTM6ZnVuY3Rpb24oZSl7KGZ1bmN0aW9uKHIsdCl7aWYodHJ1ZSl7ZS5leHBvcnRzPXQocil9ZWxzZXt9fSkodHlwZW9mIGdsb2JhbCE9XCJ1bmRlZmluZWRcIj9nbG9iYWw6dG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FsbChhLmV4cG9ydHMsYSxhLmV4cG9ydHMsX19uY2N3cGNrX3JlcXVpcmVfXyk7aT1mYWxzZX1maW5hbGx5e2lmKGkpZGVsZXRlIHJbdF19cmV0dXJuIGEuZXhwb3J0c31pZih0eXBlb2YgX19uY2N3cGNrX3JlcXVpcmVfXyE9PVwidW5kZWZpbmVkXCIpX19uY2N3cGNrX3JlcXVpcmVfXy5hYj1fX2Rpcm5hbWUrXCIvXCI7dmFyIHQ9X19uY2N3cGNrX3JlcXVpcmVfXyg1NTMpO21vZHVsZS5leHBvcnRzPXR9KSgpOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/css.escape/css.escape.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/platform/platform.js": /*!**************************************************************!*\ !*** ./node_modules/next/dist/compiled/platform/platform.js ***! \**************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { eval(__webpack_require__.ts("var __dirname = \"/\";\n(()=>{var e={541:function(e,i,t){e=t.nmd(e);\n/*!\n * Platform.js v1.3.6\n * Copyright 2014-2020 Benjamin Tan\n * Copyright 2011-2013 John-David Dalton\n * Available under MIT license\n */(function(){\"use strict\";var t={function:true,object:true};var r=t[typeof window]&&window||this;var a=r;var n=t[typeof i]&&i;var o=t[\"object\"]&&e&&!e.nodeType&&e;var l=n&&o&&typeof __webpack_require__.g==\"object\"&&__webpack_require__.g;if(l&&(l.global===l||l.window===l||l.self===l)){r=l}var s=Math.pow(2,53)-1;var f=/\\bOpera/;var b=this;var c=Object.prototype;var p=c.hasOwnProperty;var u=c.toString;function capitalize(e){e=String(e);return e.charAt(0).toUpperCase()+e.slice(1)}function cleanupOS(e,i,t){var r={\"10.0\":\"10\",6.4:\"10 Technical Preview\",6.3:\"8.1\",6.2:\"8\",6.1:\"Server 2008 R2 / 7\",\"6.0\":\"Server 2008 / Vista\",5.2:\"Server 2003 / XP 64-bit\",5.1:\"XP\",5.01:\"2000 SP1\",\"5.0\":\"2000\",\"4.0\":\"NT\",\"4.90\":\"ME\"};if(i&&t&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\\d.]+$/.exec(e)])){e=\"Windows \"+r}e=String(e);if(i&&t){e=e.replace(RegExp(i,\"i\"),t)}e=format(e.replace(/ ce$/i,\" CE\").replace(/\\bhpw/i,\"web\").replace(/\\bMacintosh\\b/,\"Mac OS\").replace(/_PowerPC\\b/i,\" OS\").replace(/\\b(OS X) [^ \\d]+/i,\"$1\").replace(/\\bMac (OS X)\\b/,\"$1\").replace(/\\/(\\d)/,\" $1\").replace(/_/g,\".\").replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i,\"\").replace(/\\bx86\\.64\\b/gi,\"x86_64\").replace(/\\b(Windows Phone) OS\\b/,\"$1\").replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/,\"$1\").split(\" on \")[0]);return e}function each(e,i){var t=-1,r=e?e.length:0;if(typeof r==\"number\"&&r>-1&&r<=s){while(++t<r){i(e[t],t,e)}}else{forOwn(e,i)}}function format(e){e=trim(e);return/^(?:webOS|i(?:OS|P))/.test(e)?e:capitalize(e)}function forOwn(e,i){for(var t in e){if(p.call(e,t)){i(e[t],t,e)}}}function getClassOf(e){return e==null?capitalize(e):u.call(e).slice(8,-1)}function isHostType(e,i){var t=e!=null?typeof e[i]:\"number\";return!/^(?:boolean|number|string|undefined)$/.test(t)&&(t==\"object\"?!!e[i]:true)}function qualify(e){return String(e).replace(/([ -])(?!$)/g,\"$1?\")}function reduce(e,i){var t=null;each(e,(function(r,a){t=i(t,r,a,e)}));return t}function trim(e){return String(e).replace(/^ +| +$/g,\"\")}function parse(e){var i=r;var t=e&&typeof e==\"object\"&&getClassOf(e)!=\"String\";if(t){i=e;e=null}var n=i.navigator||{};var o=n.userAgent||\"\";e||(e=o);var l=t||b==a;var s=t?!!n.likeChrome:/\\bChrome\\b/.test(e)&&!/internal|\\n/i.test(u.toString());var c=\"Object\",p=t?c:\"ScriptBridgingProxyObject\",d=t?c:\"Environment\",S=t&&i.java?\"JavaPackage\":getClassOf(i.java),x=t?c:\"RuntimeObject\";var m=/\\bJava/.test(S)&&i.java;var g=m&&getClassOf(i.environment)==d;var h=m?\"a\":\"α\";var v=m?\"b\":\"β\";var O=i.document||{};var y=i.operamini||i.opera;var w=f.test(w=t&&y?y[\"[[Class]]\"]:getClassOf(y))?w:y=null;var M;var E=e;var P=[];var C=null;var k=e==o;var B=k&&y&&typeof y.version==\"function\"&&y.version();var W;var _=getLayout([{label:\"EdgeHTML\",pattern:\"Edge\"},\"Trident\",{label:\"WebKit\",pattern:\"AppleWebKit\"},\"iCab\",\"Presto\",\"NetFront\",\"Tasman\",\"KHTML\",\"Gecko\"]);var R=getName([\"Adobe AIR\",\"Arora\",\"Avant Browser\",\"Breach\",\"Camino\",\"Electron\",\"Epiphany\",\"Fennec\",\"Flock\",\"Galeon\",\"GreenBrowser\",\"iCab\",\"Iceweasel\",\"K-Meleon\",\"Konqueror\",\"Lunascape\",\"Maxthon\",{label:\"Microsoft Edge\",pattern:\"(?:Edge|Edg|EdgA|EdgiOS)\"},\"Midori\",\"Nook Browser\",\"PaleMoon\",\"PhantomJS\",\"Raven\",\"Rekonq\",\"RockMelt\",{label:\"Samsung Internet\",pattern:\"SamsungBrowser\"},\"SeaMonkey\",{label:\"Silk\",pattern:\"(?:Cloud9|Silk-Accelerated)\"},\"Sleipnir\",\"SlimBrowser\",{label:\"SRWare Iron\",pattern:\"Iron\"},\"Sunrise\",\"Swiftfox\",\"Vivaldi\",\"Waterfox\",\"WebPositive\",{label:\"Yandex Browser\",pattern:\"YaBrowser\"},{label:\"UC Browser\",pattern:\"UCBrowser\"},\"Opera Mini\",{label:\"Opera Mini\",pattern:\"OPiOS\"},\"Opera\",{label:\"Opera\",pattern:\"OPR\"},\"Chromium\",\"Chrome\",{label:\"Chrome\",pattern:\"(?:HeadlessChrome)\"},{label:\"Chrome Mobile\",pattern:\"(?:CriOS|CrMo)\"},{label:\"Firefox\",pattern:\"(?:Firefox|Minefield)\"},{label:\"Firefox for iOS\",pattern:\"FxiOS\"},{label:\"IE\",pattern:\"IEMobile\"},{label:\"IE\",pattern:\"MSIE\"},\"Safari\"]);var A=getProduct([{label:\"BlackBerry\",pattern:\"BB10\"},\"BlackBerry\",{label:\"Galaxy S\",pattern:\"GT-I9000\"},{label:\"Galaxy S2\",pattern:\"GT-I9100\"},{label:\"Galaxy S3\",pattern:\"GT-I9300\"},{label:\"Galaxy S4\",pattern:\"GT-I9500\"},{label:\"Galaxy S5\",pattern:\"SM-G900\"},{label:\"Galaxy S6\",pattern:\"SM-G920\"},{label:\"Galaxy S6 Edge\",pattern:\"SM-G925\"},{label:\"Galaxy S7\",pattern:\"SM-G930\"},{label:\"Galaxy S7 Edge\",pattern:\"SM-G935\"},\"Google TV\",\"Lumia\",\"iPad\",\"iPod\",\"iPhone\",\"Kindle\",{label:\"Kindle Fire\",pattern:\"(?:Cloud9|Silk-Accelerated)\"},\"Nexus\",\"Nook\",\"PlayBook\",\"PlayStation Vita\",\"PlayStation\",\"TouchPad\",\"Transformer\",{label:\"Wii U\",pattern:\"WiiU\"},\"Wii\",\"Xbox One\",{label:\"Xbox 360\",pattern:\"Xbox\"},\"Xoom\"]);var I=getManufacturer({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,\"Kindle Fire\":1},Asus:{Transformer:1},\"Barnes & Noble\":{Nook:1},BlackBerry:{PlayBook:1},Google:{\"Google TV\":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,\"Xbox One\":1},Motorola:{Xoom:1},Nintendo:{\"Wii U\":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{\"Galaxy S\":1,\"Galaxy S2\":1,\"Galaxy S3\":1,\"Galaxy S4\":1},Sony:{PlayStation:1,\"PlayStation Vita\":1},Xiaomi:{Mi:1,Redmi:1}});var T=getOS([\"Windows Phone\",\"KaiOS\",\"Android\",\"CentOS\",{label:\"Chrome OS\",pattern:\"CrOS\"},\"Debian\",{label:\"DragonFly BSD\",pattern:\"DragonFly\"},\"Fedora\",\"FreeBSD\",\"Gentoo\",\"Haiku\",\"Kubuntu\",\"Linux Mint\",\"OpenBSD\",\"Red Hat\",\"SuSE\",\"Ubuntu\",\"Xubuntu\",\"Cygwin\",\"Symbian OS\",\"hpwOS\",\"webOS \",\"webOS\",\"Tablet OS\",\"Tizen\",\"Linux\",\"Mac OS X\",\"Macintosh\",\"Mac\",\"Windows 98;\",\"Windows \"]);function getLayout(i){return reduce(i,(function(i,t){return i||RegExp(\"\\\\b\"+(t.pattern||qualify(t))+\"\\\\b\",\"i\").exec(e)&&(t.label||t)}))}function getManufacturer(i){return reduce(i,(function(i,t,r){return i||(t[A]||t[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(A)]||RegExp(\"\\\\b\"+qualify(r)+\"(?:\\\\b|\\\\w*\\\\d)\",\"i\").exec(e))&&r}))}function getName(i){return reduce(i,(function(i,t){return i||RegExp(\"\\\\b\"+(t.pattern||qualify(t))+\"\\\\b\",\"i\").exec(e)&&(t.label||t)}))}function getOS(i){return reduce(i,(function(i,t){var r=t.pattern||qualify(t);if(!i&&(i=RegExp(\"\\\\b\"+r+\"(?:/[\\\\d.]+|[ \\\\w.]*)\",\"i\").exec(e))){i=cleanupOS(i,r,t.label||t)}return i}))}function getProduct(i){return reduce(i,(function(i,t){var r=t.pattern||qualify(t);if(!i&&(i=RegExp(\"\\\\b\"+r+\" *\\\\d+[.\\\\w_]*\",\"i\").exec(e)||RegExp(\"\\\\b\"+r+\" *\\\\w+-[\\\\w]*\",\"i\").exec(e)||RegExp(\"\\\\b\"+r+\"(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)\",\"i\").exec(e))){if((i=String(t.label&&!RegExp(r,\"i\").test(t.label)?t.label:i).split(\"/\"))[1]&&!/[\\d.]+/.test(i[0])){i[0]+=\" \"+i[1]}t=t.label||t;i=format(i[0].replace(RegExp(r,\"i\"),t).replace(RegExp(\"; *(?:\"+t+\"[_-])?\",\"i\"),\" \").replace(RegExp(\"(\"+t+\")[-_.]?(\\\\w)\",\"i\"),\"$1 $2\"))}return i}))}function getVersion(i){return reduce(i,(function(i,t){return i||(RegExp(t+\"(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)\",\"i\").exec(e)||0)[1]||null}))}function toStringPlatform(){return this.description||\"\"}_&&(_=[_]);if(/\\bAndroid\\b/.test(T)&&!A&&(M=/\\bAndroid[^;]*;(.*?)(?:Build|\\) AppleWebKit)\\b/i.exec(e))){A=trim(M[1]).replace(/^[a-z]{2}-[a-z]{2};\\s*/i,\"\")||null}if(I&&!A){A=getProduct([I])}else if(I&&A){A=A.replace(RegExp(\"^(\"+qualify(I)+\")[-_.\\\\s]\",\"i\"),I+\" \").replace(RegExp(\"^(\"+qualify(I)+\")[-_.]?(\\\\w)\",\"i\"),I+\" $2\")}if(M=/\\bGoogle TV\\b/.exec(A)){A=M[0]}if(/\\bSimulator\\b/i.test(e)){A=(A?A+\" \":\"\")+\"Simulator\"}if(R==\"Opera Mini\"&&/\\bOPiOS\\b/.test(e)){P.push(\"running in Turbo/Uncompressed mode\")}if(R==\"IE\"&&/\\blike iPhone OS\\b/.test(e)){M=parse(e.replace(/like iPhone OS/,\"\"));I=M.manufacturer;A=M.product}else if(/^iP/.test(A)){R||(R=\"Safari\");T=\"iOS\"+((M=/ OS ([\\d_]+)/i.exec(e))?\" \"+M[1].replace(/_/g,\".\"):\"\")}else if(R==\"Konqueror\"&&/^Linux\\b/i.test(T)){T=\"Kubuntu\"}else if(I&&I!=\"Google\"&&(/Chrome/.test(R)&&!/\\bMobile Safari\\b/i.test(e)||/\\bVita\\b/.test(A))||/\\bAndroid\\b/.test(T)&&/^Chrome/.test(R)&&/\\bVersion\\//i.test(e)){R=\"Android Browser\";T=/\\bAndroid\\b/.test(T)?T:\"Android\"}else if(R==\"Silk\"){if(!/\\bMobi/i.test(e)){T=\"Android\";P.unshift(\"desktop mode\")}if(/Accelerated *= *true/i.test(e)){P.unshift(\"accelerated\")}}else if(R==\"UC Browser\"&&/\\bUCWEB\\b/.test(e)){P.push(\"speed mode\")}else if(R==\"PaleMoon\"&&(M=/\\bFirefox\\/([\\d.]+)\\b/.exec(e))){P.push(\"identifying as Firefox \"+M[1])}else if(R==\"Firefox\"&&(M=/\\b(Mobile|Tablet|TV)\\b/i.exec(e))){T||(T=\"Firefox OS\");A||(A=M[1])}else if(!R||(M=!/\\bMinefield\\b/i.test(e)&&/\\b(?:Firefox|Safari)\\b/.exec(R))){if(R&&!A&&/[\\/,]|^[^(]+?\\)/.test(e.slice(e.indexOf(M+\"/\")+8))){R=null}if((M=A||I||T)&&(A||I||/\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(T))){R=/[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(T)?T:M)+\" Browser\"}}else if(R==\"Electron\"&&(M=(/\\bChrome\\/([\\d.]+)\\b/.exec(e)||0)[1])){P.push(\"Chromium \"+M)}if(!B){B=getVersion([\"(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$)|UCBrowser|YaBrowser)\",\"Version\",qualify(R),\"(?:Firefox|Minefield|NetFront)\"])}if(M=_==\"iCab\"&&parseFloat(B)>3&&\"WebKit\"||/\\bOpera\\b/.test(R)&&(/\\bOPR\\b/.test(e)?\"Blink\":\"Presto\")||/\\b(?:Midori|Nook|Safari)\\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(_)&&\"WebKit\"||!_&&/\\bMSIE\\b/i.test(e)&&(T==\"Mac OS\"?\"Tasman\":\"Trident\")||_==\"WebKit\"&&/\\bPlayStation\\b(?! Vita\\b)/i.test(R)&&\"NetFront\"){_=[M]}if(R==\"IE\"&&(M=(/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(e)||0)[1])){R+=\" Mobile\";T=\"Windows Phone \"+(/\\+$/.test(M)?M:M+\".x\");P.unshift(\"desktop mode\")}else if(/\\bWPDesktop\\b/i.test(e)){R=\"IE Mobile\";T=\"Windows Phone 8.x\";P.unshift(\"desktop mode\");B||(B=(/\\brv:([\\d.]+)/.exec(e)||0)[1])}else if(R!=\"IE\"&&_==\"Trident\"&&(M=/\\brv:([\\d.]+)/.exec(e))){if(R){P.push(\"identifying as \"+R+(B?\" \"+B:\"\"))}R=\"IE\";B=M[1]}if(k){if(isHostType(i,\"global\")){if(m){M=m.lang.System;E=M.getProperty(\"os.arch\");T=T||M.getProperty(\"os.name\")+\" \"+M.getProperty(\"os.version\")}if(g){try{B=i.require(\"ringo/engine\").version.join(\".\");R=\"RingoJS\"}catch(e){if((M=i.system)&&M.global.system==i.system){R=\"Narwhal\";T||(T=M[0].os||null)}}if(!R){R=\"Rhino\"}}else if(typeof i.process==\"object\"&&!i.process.browser&&(M=i.process)){if(typeof M.versions==\"object\"){if(typeof M.versions.electron==\"string\"){P.push(\"Node \"+M.versions.node);R=\"Electron\";B=M.versions.electron}else if(typeof M.versions.nw==\"string\"){P.push(\"Chromium \"+B,\"Node \"+M.versions.node);R=\"NW.js\";B=M.versions.nw}}if(!R){R=\"Node.js\";E=M.arch;T=M.platform;B=/[\\d.]+/.exec(M.version);B=B?B[0]:null}}}else if(getClassOf(M=i.runtime)==p){R=\"Adobe AIR\";T=M.flash.system.Capabilities.os}else if(getClassOf(M=i.phantom)==x){R=\"PhantomJS\";B=(M=M.version||null)&&M.major+\".\"+M.minor+\".\"+M.patch}else if(typeof O.documentMode==\"number\"&&(M=/\\bTrident\\/(\\d+)/i.exec(e))){B=[B,O.documentMode];if((M=+M[1]+4)!=B[1]){P.push(\"IE \"+B[1]+\" mode\");_&&(_[1]=\"\");B[1]=M}B=R==\"IE\"?String(B[1].toFixed(1)):B[0]}else if(typeof O.documentMode==\"number\"&&/^(?:Chrome|Firefox)\\b/.test(R)){P.push(\"masking as \"+R+\" \"+B);R=\"IE\";B=\"11.0\";_=[\"Trident\"];T=\"Windows\"}T=T&&format(T)}if(B&&(M=/(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(B)||/(?:alpha|beta)(?: ?\\d)?/i.exec(e+\";\"+(k&&n.appMinorVersion))||/\\bMinefield\\b/i.test(e)&&\"a\")){C=/b/i.test(M)?\"beta\":\"alpha\";B=B.replace(RegExp(M+\"\\\\+?$\"),\"\")+(C==\"beta\"?v:h)+(/\\d+\\+?/.exec(M)||\"\")}if(R==\"Fennec\"||R==\"Firefox\"&&/\\b(?:Android|Firefox OS|KaiOS)\\b/.test(T)){R=\"Firefox Mobile\"}else if(R==\"Maxthon\"&&B){B=B.replace(/\\.[\\d.]+/,\".x\")}else if(/\\bXbox\\b/i.test(A)){if(A==\"Xbox 360\"){T=null}if(A==\"Xbox 360\"&&/\\bIEMobile\\b/.test(e)){P.unshift(\"mobile mode\")}}else if((/^(?:Chrome|IE|Opera)$/.test(R)||R&&!A&&!/Browser|Mobi/.test(R))&&(T==\"Windows CE\"||/Mobi/i.test(e))){R+=\" Mobile\"}else if(R==\"IE\"&&k){try{if(i.external===null){P.unshift(\"platform preview\")}}catch(e){P.unshift(\"embedded\")}}else if((/\\bBlackBerry\\b/.test(A)||/\\bBB10\\b/.test(e))&&(M=(RegExp(A.replace(/ +/g,\" *\")+\"/([.\\\\d]+)\",\"i\").exec(e)||0)[1]||B)){M=[M,/BB10/.test(e)];T=(M[1]?(A=null,I=\"BlackBerry\"):\"Device Software\")+\" \"+M[0];B=null}else if(this!=forOwn&&A!=\"Wii\"&&(k&&y||/Opera/.test(R)&&/\\b(?:MSIE|Firefox)\\b/i.test(e)||R==\"Firefox\"&&/\\bOS X (?:\\d+\\.){2,}/.test(T)||R==\"IE\"&&(T&&!/^Win/.test(T)&&B>5.5||/\\bWindows XP\\b/.test(T)&&B>8||B==8&&!/\\bTrident\\b/.test(e)))&&!f.test(M=parse.call(forOwn,e.replace(f,\"\")+\";\"))&&M.name){M=\"ing as \"+M.name+((M=M.version)?\" \"+M:\"\");if(f.test(R)){if(/\\bIE\\b/.test(M)&&T==\"Mac OS\"){T=null}M=\"identify\"+M}else{M=\"mask\"+M;if(w){R=format(w.replace(/([a-z])([A-Z])/g,\"$1 $2\"))}else{R=\"Opera\"}if(/\\bIE\\b/.test(M)){T=null}if(!k){B=null}}_=[\"Presto\"];P.push(M)}if(M=(/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(e)||0)[1]){M=[parseFloat(M.replace(/\\.(\\d)$/,\".0$1\")),M];if(R==\"Safari\"&&M[1].slice(-1)==\"+\"){R=\"WebKit Nightly\";C=\"alpha\";B=M[1].slice(0,-1)}else if(B==M[1]||B==(M[2]=(/\\bSafari\\/([\\d.]+\\+?)/i.exec(e)||0)[1])){B=null}M[1]=(/\\b(?:Headless)?Chrome\\/([\\d.]+)/i.exec(e)||0)[1];if(M[0]==537.36&&M[2]==537.36&&parseFloat(M[1])>=28&&_==\"WebKit\"){_=[\"Blink\"]}if(!k||!s&&!M[1]){_&&(_[1]=\"like Safari\");M=(M=M[0],M<400?1:M<500?2:M<526?3:M<533?4:M<534?\"4+\":M<535?5:M<537?6:M<538?7:M<601?8:M<602?9:M<604?10:M<606?11:M<608?12:\"12\")}else{_&&(_[1]=\"like Chrome\");M=M[1]||(M=M[0],M<530?1:M<532?2:M<532.05?3:M<533?4:M<534.03?5:M<534.07?6:M<534.1?7:M<534.13?8:M<534.16?9:M<534.24?10:M<534.3?11:M<535.01?12:M<535.02?\"13+\":M<535.07?15:M<535.11?16:M<535.19?17:M<536.05?18:M<536.1?19:M<537.01?20:M<537.11?\"21+\":M<537.13?23:M<537.18?24:M<537.24?25:M<537.36?26:_!=\"Blink\"?\"27\":\"28\")}_&&(_[1]+=\" \"+(M+=typeof M==\"number\"?\".x\":/[.+]/.test(M)?\"\":\"+\"));if(R==\"Safari\"&&(!B||parseInt(B)>45)){B=M}else if(R==\"Chrome\"&&/\\bHeadlessChrome/i.test(e)){P.unshift(\"headless\")}}if(R==\"Opera\"&&(M=/\\bzbov|zvav$/.exec(T))){R+=\" \";P.unshift(\"desktop mode\");if(M==\"zvav\"){R+=\"Mini\";B=null}else{R+=\"Mobile\"}T=T.replace(RegExp(\" *\"+M+\"$\"),\"\")}else if(R==\"Safari\"&&/\\bChrome\\b/.exec(_&&_[1])){P.unshift(\"desktop mode\");R=\"Chrome Mobile\";B=null;if(/\\bOS X\\b/.test(T)){I=\"Apple\";T=\"iOS 4.3+\"}else{T=null}}else if(/\\bSRWare Iron\\b/.test(R)&&!B){B=getVersion(\"Chrome\")}if(B&&B.indexOf(M=/[\\d.]+$/.exec(T))==0&&e.indexOf(\"/\"+M+\"-\")>-1){T=trim(T.replace(M,\"\"))}if(T&&T.indexOf(R)!=-1&&!RegExp(R+\" OS\").test(T)){T=T.replace(RegExp(\" *\"+qualify(R)+\" *\"),\"\")}if(_&&!/\\b(?:Avant|Nook)\\b/.test(R)&&(/Browser|Lunascape|Maxthon/.test(R)||R!=\"Safari\"&&/^iOS/.test(T)&&/\\bSafari\\b/.test(_[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(R)&&_[1])){(M=_[_.length-1])&&P.push(M)}if(P.length){P=[\"(\"+P.join(\"; \")+\")\"]}if(I&&A&&A.indexOf(I)<0){P.push(\"on \"+I)}if(A){P.push((/^on /.test(P[P.length-1])?\"\":\"on \")+A)}if(T){M=/ ([\\d.+]+)$/.exec(T);W=M&&T.charAt(T.length-M[0].length-1)==\"/\";T={architecture:32,family:M&&!W?T.replace(M[0],\"\"):T,version:M?M[1]:null,toString:function(){var e=this.version;return this.family+(e&&!W?\" \"+e:\"\")+(this.architecture==64?\" 64-bit\":\"\")}}}if((M=/\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(E))&&!/\\bi686\\b/i.test(E)){if(T){T.architecture=64;T.family=T.family.replace(RegExp(\" *\"+M),\"\")}if(R&&(/\\bWOW64\\b/i.test(e)||k&&/\\w(?:86|32)$/.test(n.cpuClass||n.platform)&&!/\\bWin64; x64\\b/i.test(e))){P.unshift(\"32-bit\")}}else if(T&&/^OS X/.test(T.family)&&R==\"Chrome\"&&parseFloat(B)>=39){T.architecture=64}e||(e=null);var F={};F.description=e;F.layout=_&&_[0];F.manufacturer=I;F.name=R;F.prerelease=C;F.product=A;F.ua=e;F.version=R&&B;F.os=T||{architecture:null,family:null,version:null,toString:function(){return\"null\"}};F.parse=parse;F.toString=toStringPlatform;if(F.version){P.unshift(B)}if(F.name){P.unshift(R)}if(T&&R&&!(T==String(T).split(\" \")[0]&&(T==R.split(\" \")[0]||A))){P.push(A?\"(\"+T+\")\":\"on \"+T)}if(P.length){F.description=P.join(\" \")}return F}var d=parse();if(n&&o){forOwn(d,(function(e,i){n[i]=e}))}else{r.platform=d}}).call(this)}};var i={};function __nccwpck_require__(t){var r=i[t];if(r!==undefined){return r.exports}var a=i[t]={id:t,loaded:false,exports:{}};var n=true;try{e[t].call(a.exports,a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete i[t]}a.loaded=true;return a.exports}(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(541);module.exports=t})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9wbGF0Zm9ybS9wbGF0Zm9ybS5qcyIsIm1hcHBpbmdzIjoiO0FBQUEsTUFBTSxPQUFPLG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lcXVpcmVfXyg1NDEpO21vZHVsZS5leHBvcnRzPXR9KSgpOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/platform/platform.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js": /*!********************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js ***! \********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = __webpack_require__(/*! next/dist/compiled/react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\nvar Scheduler = __webpack_require__(/*! next/dist/compiled/scheduler */ \"(app-client)/./node_modules/next/dist/compiled/scheduler/index.js\");\n\nvar Internals = {\n usingClientEntryPoint: false,\n Events: null,\n Dispatcher: {\n current: null\n }\n};\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n {\n suppressWarning = newSuppressWarning;\n }\n} // In DEV, calls to console.warn and console.error get replaced\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n if (!suppressWarning) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n if (!suppressWarning) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar assign = Object.assign;\n\n// -----------------------------------------------------------------------------\n// Killswitch\n//\n// Flags that exist solely to turn off a change in case it causes a regression\n// when it rolls out to prod. We should remove these as soon as possible.\n// -----------------------------------------------------------------------------\n// -----------------------------------------------------------------------------\n// Land or remove (moderate effort)\n//\n// Flags that can be probably deleted or landed, but might require extra effort\n// like migrating internal callers or performance testing.\n// -----------------------------------------------------------------------------\n// TODO: Finish rolling out in www\n\nvar enableClientRenderFallbackOnTextMismatch = true; // Not sure if www still uses this. We don't have a replacement but whatever we\n// Slated for removal in the future (significant effort)\n//\n// These are experiments that didn't work out, and never shipped, but we can't\n// delete from the codebase until we migrate internal callers.\n// -----------------------------------------------------------------------------\n// Add a callback property to suspense to notify which promises are currently\n// in the update queue. This allows reporting and tracing of what is causing\n// the user to see a loading state.\n//\n// Also allows hydration callbacks to fire when a dehydrated boundary gets\n// hydrated or deleted.\n//\n// This will eventually be replaced by the Transition Tracing proposal.\n\nvar enableSuspenseCallback = false; // Experimental Scope support.\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\nvar enableHostSingletons = true;\n\nvar diffInCommitPhase = false;\nvar enableAsyncActions = false;\nvar alwaysThrottleRetries = true; // -----------------------------------------------------------------------------\n// Chopping Block\n//\n// Planned feature deprecations and breaking changes. Sorted roughly in order of\n// when we plan to enable them.\n// -----------------------------------------------------------------------------\n// This flag enables Strict Effects by default. We're not turning this on until\n// after 18 because it requires migration work. Recommendation is to use\n// <StrictMode /> to gradually upgrade components.\n// If TRUE, trees rendered with createRoot will be StrictEffectsMode.\n// If FALSE, these trees will be StrictLegacyMode.\n\nvar createRootStrictEffectsByDefault = false;\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar enableProfilerNestedUpdatePhase = true; // Adds verbose console logging for e.g. state updates, suspense, and work loop\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\nvar REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar contextStackCursor$1 = createCursor(null);\nvar contextFiberStackCursor = createCursor(null);\nvar rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a <form />)\n\nfunction requiredContext(c) {\n {\n if (c === null) {\n error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n }\n\n return c;\n}\n\nfunction getCurrentRootHostContainer() {\n return rootInstanceStackCursor.current;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, null, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context !== nextContext) {\n // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n }\n}\n\nfunction popHostContext(fiber) {\n if (contextFiberStackCursor.current === fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n }\n}\n\nvar NoFlags$1 =\n/* */\n0;\nvar PerformedWork =\n/* */\n1;\nvar Placement =\n/* */\n2;\nvar DidCapture =\n/* */\n128;\nvar Hydrating =\n/* */\n4096; // You can change the rest (and add more).\n\nvar Update =\n/* */\n4;\n/* Skipped value: 0b0000000000000000000000001000; */\n\nvar ChildDeletion =\n/* */\n16;\nvar ContentReset =\n/* */\n32;\nvar Callback =\n/* */\n64;\n/* Used by DidCapture: 0b0000000000000000000010000000; */\n\nvar ForceClientRender =\n/* */\n256;\nvar Ref =\n/* */\n512;\nvar Snapshot =\n/* */\n1024;\nvar Passive$1 =\n/* */\n2048;\n/* Used by Hydrating: 0b0000000000000001000000000000; */\n\nvar Visibility =\n/* */\n8192;\nvar StoreConsistency =\n/* */\n16384; // It's OK to reuse these bits because these flags are mutually exclusive for\n// different fiber types. We should really be doing this for as many flags as\n// possible, because we're about to run out of bits.\n\nvar ScheduleRetry = StoreConsistency;\nvar ShouldSuspendCommit = Visibility;\nvar LifecycleEffectMask = Passive$1 | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/* */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n32768;\nvar ShouldCapture =\n/* */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/* */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/* */\n2097152;\nvar LayoutStatic =\n/* */\n4194304;\nvar PassiveStatic =\n/* */\n8388608;\nvar MaySuspendCommit =\n/* */\n16777216; // Flag used to identify newly inserted fibers. It isn't reset after commit unlike `Placement`.\n\nvar PlacementDEV =\n/* */\n33554432;\nvar MountLayoutDev =\n/* */\n67108864;\nvar MountPassiveDev =\n/* */\n134217728; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | (0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive$1 | Visibility | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit;\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback$3 = Scheduler.unstable_scheduleCallback;\nvar cancelCallback$1 = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now$1 = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority$1 = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\n\nvar log$1 = Scheduler.log;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n if (enableSchedulingProfiler) {\n // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n // This gives DevTools a way to feature detect that isn't tied to version number\n // (since profiling and timeline are controlled by different feature flags).\n internals = assign({}, internals, {\n getLaneLabelMap: getLaneLabelMap,\n injectProfilingHooks: injectProfilingHooks\n });\n }\n\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n }\n\n if (hook.checkDCE) {\n // This is the real DevTools.\n return true;\n } else {\n // This is likely a hook installed by Fast Refresh runtime.\n return false;\n }\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot$1(root, eventPriority) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var schedulerPriority;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n schedulerPriority = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriority = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriority = NormalPriority$1;\n break;\n\n case IdleEventPriority:\n schedulerPriority = IdlePriority;\n break;\n\n default:\n schedulerPriority = NormalPriority$1;\n break;\n }\n\n injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onPostCommitRoot(root) {\n if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n {\n if (typeof log$1 === 'function') {\n // We're in a test because Scheduler.log only exists\n // in SchedulerMock. To reduce the noise in strict mode tests,\n // suppress warnings and disable scheduler yielding during the double render\n unstable_setDisableYieldValue(newIsStrictMode);\n setSuppressWarning(newIsStrictMode);\n }\n\n if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n {\n var map = new Map();\n var lane = 1;\n\n for (var index = 0; index < TotalLanes; index++) {\n var label = getLabelForLane(lane);\n map.set(lane, label);\n lane *= 2;\n }\n\n return map;\n }\n}\n\nfunction markCommitStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n injectedProfilingHooks.markCommitStarted(lanes);\n }\n }\n}\nfunction markCommitStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n injectedProfilingHooks.markCommitStopped();\n }\n }\n}\nfunction markComponentRenderStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n injectedProfilingHooks.markComponentRenderStarted(fiber);\n }\n }\n}\nfunction markComponentRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n injectedProfilingHooks.markComponentRenderStopped();\n }\n }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n }\n }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n }\n }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n }\n }\n}\nfunction markLayoutEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n }\n }\n}\nfunction markLayoutEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n injectedProfilingHooks.markLayoutEffectsStopped();\n }\n }\n}\nfunction markPassiveEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n }\n }\n}\nfunction markPassiveEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n injectedProfilingHooks.markPassiveEffectsStopped();\n }\n }\n}\nfunction markRenderStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n injectedProfilingHooks.markRenderStarted(lanes);\n }\n }\n}\nfunction markRenderYielded() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n injectedProfilingHooks.markRenderYielded();\n }\n }\n}\nfunction markRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n injectedProfilingHooks.markRenderStopped();\n }\n }\n}\nfunction markRenderScheduled(lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n injectedProfilingHooks.markRenderScheduled(lane);\n }\n }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n }\n }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n }\n }\n}\n\nvar NoMode =\n/* */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/* */\n1;\nvar ProfileMode =\n/* */\n2;\nvar StrictLegacyMode =\n/* */\n8;\nvar StrictEffectsMode =\n/* */\n16;\nvar NoStrictPassiveEffectsMode =\n/* */\n64;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncHydrationLane =\n/* */\n1;\nvar SyncLane =\n/* */\n2;\nvar InputContinuousHydrationLane =\n/* */\n4;\nvar InputContinuousLane =\n/* */\n8;\nvar DefaultHydrationLane =\n/* */\n16;\nvar DefaultLane =\n/* */\n32;\nvar TransitionHydrationLane =\n/* */\n64;\nvar TransitionLanes =\n/* */\n8388480;\nvar TransitionLane1 =\n/* */\n128;\nvar TransitionLane2 =\n/* */\n256;\nvar TransitionLane3 =\n/* */\n512;\nvar TransitionLane4 =\n/* */\n1024;\nvar TransitionLane5 =\n/* */\n2048;\nvar TransitionLane6 =\n/* */\n4096;\nvar TransitionLane7 =\n/* */\n8192;\nvar TransitionLane8 =\n/* */\n16384;\nvar TransitionLane9 =\n/* */\n32768;\nvar TransitionLane10 =\n/* */\n65536;\nvar TransitionLane11 =\n/* */\n131072;\nvar TransitionLane12 =\n/* */\n262144;\nvar TransitionLane13 =\n/* */\n524288;\nvar TransitionLane14 =\n/* */\n1048576;\nvar TransitionLane15 =\n/* */\n2097152;\nvar TransitionLane16 =\n/* */\n4194304;\nvar RetryLanes =\n/* */\n125829120;\nvar RetryLane1 =\n/* */\n8388608;\nvar RetryLane2 =\n/* */\n16777216;\nvar RetryLane3 =\n/* */\n33554432;\nvar RetryLane4 =\n/* */\n67108864;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/* */\n134217728;\nvar NonIdleLanes =\n/* */\n268435455;\nvar IdleHydrationLane =\n/* */\n268435456;\nvar IdleLane =\n/* */\n536870912;\nvar OffscreenLane =\n/* */\n1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n {\n if (lane & SyncHydrationLane) {\n return 'SyncHydrationLane';\n }\n\n if (lane & SyncLane) {\n return 'Sync';\n }\n\n if (lane & InputContinuousHydrationLane) {\n return 'InputContinuousHydration';\n }\n\n if (lane & InputContinuousLane) {\n return 'InputContinuous';\n }\n\n if (lane & DefaultHydrationLane) {\n return 'DefaultHydration';\n }\n\n if (lane & DefaultLane) {\n return 'Default';\n }\n\n if (lane & TransitionHydrationLane) {\n return 'TransitionHydration';\n }\n\n if (lane & TransitionLanes) {\n return 'Transition';\n }\n\n if (lane & RetryLanes) {\n return 'Retry';\n }\n\n if (lane & SelectiveHydrationLane) {\n return 'SelectiveHydration';\n }\n\n if (lane & IdleHydrationLane) {\n return 'IdleHydration';\n }\n\n if (lane & IdleLane) {\n return 'Idle';\n }\n\n if (lane & OffscreenLane) {\n return 'Offscreen';\n }\n }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n\n switch (getHighestPriorityLane(lanes)) {\n case SyncHydrationLane:\n return SyncHydrationLane;\n\n case SyncLane:\n return SyncLane;\n\n case InputContinuousHydrationLane:\n return InputContinuousHydrationLane;\n\n case InputContinuousLane:\n return InputContinuousLane;\n\n case DefaultHydrationLane:\n return DefaultHydrationLane;\n\n case DefaultLane:\n return DefaultLane;\n\n case TransitionHydrationLane:\n return TransitionHydrationLane;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return lanes & TransitionLanes;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n return lanes & RetryLanes;\n\n case SelectiveHydrationLane:\n return SelectiveHydrationLane;\n\n case IdleHydrationLane:\n return IdleHydrationLane;\n\n case IdleLane:\n return IdleLane;\n\n case OffscreenLane:\n return OffscreenLane;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return lanes;\n }\n}\n\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n var nextLane = getHighestPriorityLane(nextLanes);\n var wipLane = getHighestPriorityLane(wipLanes);\n\n if ( // Tests whether the next lane is equal or lower priority than the wip\n // one. This works because the bits decrease in priority as you go left.\n nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n // only difference between default updates and transition updates is that\n // default updates do not support refresh transitions.\n nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n // Keep working on the existing in-progress tree. Do not interrupt.\n return wipLanes;\n }\n }\n\n if ((nextLanes & InputContinuousLane) !== NoLanes) {\n // When updates are sync by default, we entangle continuous priority updates\n // and default updates, so they render in the same batch. The only reason\n // they use separate lanes is because continuous updates should interrupt\n // transitions, but default updates should not.\n nextLanes |= pendingLanes & DefaultLane;\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n // TODO: Reconsider this. The counter-argument is that the partial work\n // represents an intermediate state, which we don't want to show to the user.\n // And by spending extra time finishing it, we're increasing the amount of\n // time it takes to show the final state, which is what they are actually\n // waiting for.\n //\n // For those exceptions where entanglement is semantically important,\n // we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case SyncHydrationLane:\n case SyncLane:\n case InputContinuousHydrationLane:\n case InputContinuousLane:\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js.\n // When we made it larger, a product metric in www regressed, suggesting\n // there's a user interaction that's being starved by a series of\n // synchronous updates. If that theory is correct, the proper solution is\n // to fix the starvation. However, this scenario supports the idea that\n // expiration times are an important safeguard when starvation\n // does happen.\n return currentTime + 250;\n\n case DefaultHydrationLane:\n case DefaultLane:\n case TransitionHydrationLane:\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return currentTime + 5000;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n // TODO: Retries should be allowed to expire if they are CPU bound for\n // too long, but when I made this change it caused a spike in browser\n // crashes. There must be some other underlying bug; not super urgent but\n // ideally should figure out why and fix it. Unfortunately we don't have\n // a repro for the crashes, only detected via production metrics.\n return NoTimestamp;\n\n case SelectiveHydrationLane:\n case IdleHydrationLane:\n case IdleLane:\n case OffscreenLane:\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n }\n\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n //\n // We exclude retry lanes because those must always be time sliced, in order\n // to unwrap uncached promises.\n // TODO: Write a test for this\n\n var lanes = pendingLanes & ~RetryLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {\n if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) {\n // The error recovery mechanism is disabled until these lanes are cleared.\n return NoLanes;\n }\n\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n return (lanes & (SyncLane | SyncHydrationLane)) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n // TODO: Should hydration lanes be included here? This function is only\n // used in `updateDeferredValueImpl`.\n var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n // This is a separate check from includesBlockingLane because a lane can\n // expire after a render has already started.\n return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n // Cycle through the lanes, assigning each new transition to the next lane.\n // In most cases, this means every transition gets its own lane, until we\n // run out of lanes and cycle back to the beginning.\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n\n if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n nextTransitionLane = TransitionLane1;\n }\n\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n\n if ((nextRetryLane & RetryLanes) === NoLanes) {\n nextRetryLane = RetryLane1;\n }\n\n return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated(root, updateLane) {\n root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n // could unblock them. Clear the suspended lanes so that we can try rendering\n // them again.\n //\n // TODO: We really only need to unsuspend only lanes that are in the\n // `subtreeLanes` of the updated fiber, or the update lanes of the return\n // path. This would exclude suspended updates in an unrelated sibling tree,\n // since there's no way for this update to unblock it.\n //\n // We don't do this if the incoming update is idle, because we never process\n // idle updates until after all the regular updates have finished; there's no\n // way it could unblock a transition.\n\n if (updateLane !== IdleLane) {\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n }\n}\nfunction markRootSuspended$1(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootPinged(root, pingedLanes) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n var entanglements = root.entanglements;\n var expirationTimes = root.expirationTimes;\n var hiddenUpdates = root.hiddenUpdates; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n expirationTimes[index] = NoTimestamp;\n var hiddenUpdatesForLane = hiddenUpdates[index];\n\n if (hiddenUpdatesForLane !== null) {\n hiddenUpdates[index] = null; // \"Hidden\" updates are updates that were made to a hidden component. They\n // have special logic associated with them because they may be entangled\n // with updates that occur outside that tree. But once the outer tree\n // commits, they behave like regular updates.\n\n for (var i = 0; i < hiddenUpdatesForLane.length; i++) {\n var update = hiddenUpdatesForLane[i];\n\n if (update !== null) {\n update.lane &= ~OffscreenLane;\n }\n }\n }\n\n lanes &= ~lane;\n }\n}\nfunction markRootEntangled(root, entangledLanes) {\n // In addition to entangling each of the given lanes with each other, we also\n // have to consider _transitive_ entanglements. For each lane that is already\n // entangled with *any* of the given lanes, that lane is now transitively\n // entangled with *all* the given lanes.\n //\n // Translated: If C is entangled with A, then entangling A with B also\n // entangles C with B.\n //\n // If this is hard to grasp, it might help to intentionally break this\n // function and look at the tests that fail in ReactTransition-test.js. Try\n // commenting out one of the conditions below.\n var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = rootEntangledLanes;\n\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n\n if ( // Is this one of the newly entangled lanes?\n lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n entanglements[index] & entangledLanes) {\n entanglements[index] |= entangledLanes;\n }\n\n lanes &= ~lane;\n }\n}\nfunction markHiddenUpdate(root, update, lane) {\n var index = laneToIndex(lane);\n var hiddenUpdates = root.hiddenUpdates;\n var hiddenUpdatesForLane = hiddenUpdates[index];\n\n if (hiddenUpdatesForLane === null) {\n hiddenUpdates[index] = [update];\n } else {\n hiddenUpdatesForLane.push(update);\n }\n\n update.lane = lane | OffscreenLane;\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = getHighestPriorityLane(renderLanes);\n var lane;\n\n {\n switch (renderLane) {\n case SyncLane:\n lane = SyncHydrationLane;\n break;\n\n case InputContinuousLane:\n lane = InputContinuousHydrationLane;\n break;\n\n case DefaultLane:\n lane = DefaultHydrationLane;\n break;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n lane = TransitionHydrationLane;\n break;\n\n case IdleLane:\n lane = IdleHydrationLane;\n break;\n\n default:\n // Everything else is already either a hydration lane, or shouldn't\n // be retried at a hydration lane.\n lane = NoLane;\n break;\n }\n } // Check if the lane we chose is suspended. If so, that indicates that we\n // already attempted and failed to hydrate at that level. Also check if we're\n // already rendering that lane, which is rare but could happen.\n\n\n if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n // Give up trying to hydrate and fall back to client render.\n return NoLane;\n }\n\n return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n updaters.add(fiber);\n lanes &= ~lane;\n }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n var memoizedUpdaters = root.memoizedUpdaters;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n\n if (updaters.size > 0) {\n updaters.forEach(function (fiber) {\n var alternate = fiber.alternate;\n\n if (alternate === null || !memoizedUpdaters.has(alternate)) {\n memoizedUpdaters.add(fiber);\n }\n });\n updaters.clear();\n }\n\n lanes &= ~lane;\n }\n}\nfunction getTransitionsForLanes(root, lanes) {\n {\n return null;\n }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = currentUpdatePriority;\n\n try {\n currentUpdatePriority = priority;\n return fn();\n } finally {\n currentUpdatePriority = previousPriority;\n }\n}\nfunction higherEventPriority(a, b) {\n return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n var lane = getHighestPriorityLane(lanes);\n\n if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n return DiscreteEventPriority;\n }\n\n if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n return ContinuousEventPriority;\n }\n\n if (includesNonIdleWork(lane)) {\n return DefaultEventPriority;\n }\n\n return IdleEventPriority;\n}\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkPropStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\nvar HostHoistable = 26;\nvar HostSingleton = 27;\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nvar internalRootNodeResourcesKey = '__reactResources$' + randomKey;\nvar internalHoistableMarker = '__reactMarker$' + randomKey;\nfunction detachDeletedInstance(node) {\n // TODO: This function is only called on host components. I don't think all of\n // these fields are relevant.\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n // $FlowFixMe[prop-missing]\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n // $FlowFixMe[prop-missing]\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n // $FlowFixMe[prop-missing]\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n // $FlowFixMe[prop-missing]\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n var tag = inst.tag;\n\n if (tag === HostComponent || tag === HostText || tag === SuspenseComponent || (tag === HostHoistable ) || (tag === HostSingleton ) || tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n var tag = inst.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton ) || tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\nfunction getResourcesFromRoot(root) {\n var resources = root[internalRootNodeResourcesKey];\n\n if (!resources) {\n resources = root[internalRootNodeResourcesKey] = {\n hoistableStyles: new Map(),\n hoistableScripts: new Map()\n };\n }\n\n return resources;\n}\nfunction isMarkedHoistable(node) {\n return !!node[internalHoistableMarker];\n}\nfunction markNodeAsHoistable(node) {\n node[internalHoistableMarker] = true;\n}\nfunction isOwnedInstance(node) {\n return !!(node[internalHoistableMarker] || node[internalInstanceKey]);\n}\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in __DEV__.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\n/* eslint-disable max-len */\n\nvar ATTRIBUTE_NAME_START_CHAR = \":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\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\n\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n // shouldRemoveAttribute\n switch (typeof expected) {\n case 'function':\n case 'symbol':\n // eslint-disable-line\n return expected;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return expected;\n }\n }\n }\n\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\nfunction getValueForAttributeOnCustomComponent(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n // shouldRemoveAttribute\n switch (typeof expected) {\n case 'symbol':\n case 'object':\n // Symbols and objects are ignored when they're emitted so\n // it would be expected that they end up not having an attribute.\n return expected;\n\n }\n\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\nfunction setValueForAttribute(node, name, value) {\n if (isAttributeNameSafe(name)) {\n // If the prop isn't in the special list, treat it as a simple attribute.\n // shouldRemoveAttribute\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n // eslint-disable-line\n node.removeAttribute(name);\n return;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n node.removeAttribute(name);\n return;\n }\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttribute(name, '' + value);\n }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n {\n node.removeAttribute(name);\n return;\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttribute(name, '' + value);\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n {\n node.removeAttribute(name);\n return;\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttributeNS(namespace, name, '' + value);\n}\n\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap$1();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$2.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$2.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct$1(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeFiber(fiber) {\n\n switch (fiber.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node); // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName$1(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName$1(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName$1(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName$1(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n case REACT_SERVER_CONTEXT_TYPE:\n {\n var context2 = type;\n return (context2.displayName || context2._globalName) + '.Provider';\n }\n\n }\n }\n\n return null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n var tag = fiber.tag,\n type = fiber.type;\n\n switch (tag) {\n case CacheComponent:\n return 'Cache';\n\n case ContextConsumer:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case ContextProvider:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case DehydratedFragment:\n return 'DehydratedFragment';\n\n case ForwardRef:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case Fragment:\n return 'Fragment';\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n // Host component type is the display name (e.g. \"div\", \"View\")\n return type;\n\n case HostPortal:\n return 'Portal';\n\n case HostRoot:\n return 'Root';\n\n case HostText:\n return 'Text';\n\n case LazyComponent:\n // Name comes from the type in this case; we don't have a tag.\n return getComponentNameFromType(type);\n\n case Mode:\n if (type === REACT_STRICT_MODE_TYPE) {\n // Don't be less specific than shared/getComponentNameFromType\n return 'StrictMode';\n }\n\n return 'Mode';\n\n case OffscreenComponent:\n return 'Offscreen';\n\n case Profiler:\n return 'Profiler';\n\n case ScopeComponent:\n return 'Scope';\n\n case SuspenseComponent:\n return 'Suspense';\n\n case SuspenseListComponent:\n return 'SuspenseList';\n\n case TracingMarkerComponent:\n return 'TracingMarker';\n // The display name for this tags come from the user-provided type:\n\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n break;\n\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentNameFromFiber(owner);\n }\n }\n\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction getCurrentFiber() {\n {\n return current;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\n\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\n\nfunction toString(value) {\n // The coercion safety check is performed in getToStringValue().\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return value;\n\n case 'object':\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n {\n checkFormFieldValueStringCoercion(node[valueField]);\n }\n\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n // $FlowFixMe[missing-this-annot]\n get: function () {\n return get.call(this);\n },\n // $FlowFixMe[missing-local-annot]\n // $FlowFixMe[missing-this-annot]\n set: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n }\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\n// When passing user input into querySelector(All) the embedded string must not alter\n// the semantics of the query. This escape function is safe to use when we know the\n// provided value is going to be wrapped in double quotes as part of an attribute selector\n// Do not use it anywhere else\n// we escape double quotes and backslashes\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\\\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n return value.replace(escapeSelectorAttributeValueInsideDoubleQuotesRegex, function (ch) {\n return '\\\\' + ch.charCodeAt(0).toString(16) + ' ';\n });\n}\n\nvar didWarnValueDefaultValue$1 = false;\nvar didWarnCheckedDefaultChecked = false;\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\nfunction validateInputProps(element, props) {\n {\n // Normally we check for undefined and null the same, but explicitly specifying both\n // properties, at all is probably worth warning for. We could move this either direction\n // and just make it ok to pass null or just check hasOwnProperty.\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {\n var node = element; // Temporarily disconnect the input from any radio buttons.\n // Changing the type or name as the same time as changing the checked value\n // needs to be atomically applied. We can only ensure that by disconnecting\n // the name while do the mutations and then reapply the name after that's done.\n\n node.name = '';\n\n if (type != null && typeof type !== 'function' && typeof type !== 'symbol' && typeof type !== 'boolean') {\n {\n checkAttributeStringCoercion(type, 'type');\n }\n\n node.type = type;\n } else {\n node.removeAttribute('type');\n }\n\n if (value != null) {\n if (type === 'number') {\n if ( // $FlowFixMe[incompatible-type]\n value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(getToStringValue(value));\n }\n } else if (node.value !== toString(getToStringValue(value))) {\n node.value = toString(getToStringValue(value));\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (value != null) {\n setDefaultValue(node, type, getToStringValue(value));\n } else if (defaultValue != null) {\n setDefaultValue(node, type, getToStringValue(defaultValue));\n } else if (lastDefaultValue != null) {\n node.removeAttribute('value');\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (checked == null && defaultChecked != null) {\n node.defaultChecked = !!defaultChecked;\n }\n }\n\n if (checked != null && node.checked !== !!checked) {\n node.checked = checked;\n }\n\n if (name != null && typeof name !== 'function' && typeof name !== 'symbol' && typeof name !== 'boolean') {\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n node.name = toString(getToStringValue(name));\n } else {\n node.removeAttribute('name');\n }\n}\nfunction initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating) {\n var node = element;\n\n if (type != null && typeof type !== 'function' && typeof type !== 'symbol' && typeof type !== 'boolean') {\n {\n checkAttributeStringCoercion(type, 'type');\n }\n\n node.type = type;\n }\n\n if (value != null || defaultValue != null) {\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (value === undefined || value === null)) {\n return;\n }\n\n var defaultValueStr = defaultValue != null ? toString(getToStringValue(defaultValue)) : '';\n var initialValue = value != null ? toString(getToStringValue(value)) : defaultValueStr; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var checkedOrDefault = checked != null ? checked : defaultChecked; // TODO: This 'function' or 'symbol' check isn't replicated in other places\n // so this semantic is inconsistent.\n\n var initialChecked = typeof checkedOrDefault !== 'function' && typeof checkedOrDefault !== 'symbol' && !!checkedOrDefault; // The checked property never gets assigned. It must be manually set.\n // We don't want to do this when hydrating so that existing user input isn't\n // modified\n // TODO: I'm pretty sure this is a bug because initialValueTracking won't be\n // correct for the hydration case then.\n\n if (!isHydrating) {\n node.checked = !!initialChecked;\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!initialChecked;\n } // Name needs to be set at the end so that it applies atomically to connected radio buttons.\n\n\n if (name != null && typeof name !== 'function' && typeof name !== 'symbol' && typeof name !== 'boolean') {\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n node.name = name;\n }\n}\nfunction restoreControlledInputState(element, props) {\n var rootNode = element;\n updateInput(rootNode, props.value, props.defaultValue, props.defaultValue, props.checked, props.defaultChecked, props.type, props.name);\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n var group = queryRoot.querySelectorAll('input[name=\"' + escapeSelectorAttributeValueInsideDoubleQuotes('' + name) + '\"][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateInput(otherNode, otherProps.value, otherProps.defaultValue, otherProps.defaultValue, otherProps.checked, otherProps.defaultChecked, otherProps.type, otherProps.name);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateOptionProps(element, props) {\n {\n // If a value is not provided, then the children must be simple.\n if (props.value == null) {\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n });\n } else if (props.dangerouslySetInnerHTML != null) {\n if (!didWarnInvalidInnerHTML) {\n didWarnInvalidInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nvar didWarnValueDefaultValue;\n\n{\n didWarnValueDefaultValue = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var propNameIsArray = isArray(props[propName]);\n\n if (props.multiple && !propNameIsArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && propNameIsArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction validateSelectProps(element, props) {\n {\n checkSelectPropTypes(props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnValueDefaultValue = true;\n }\n }\n}\nfunction initSelect(element, value, defaultValue, multiple) {\n var node = element;\n node.multiple = !!multiple;\n\n if (value != null) {\n updateOptions(node, !!multiple, value, false);\n } else if (defaultValue != null) {\n updateOptions(node, !!multiple, defaultValue, true);\n }\n}\nfunction updateSelect(element, value, defaultValue, multiple, wasMultiple) {\n var node = element;\n\n if (value != null) {\n updateOptions(node, !!multiple, value, false);\n } else if (!!wasMultiple !== !!multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (defaultValue != null) {\n updateOptions(node, !!multiple, defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!multiple, multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledSelectState(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\n\nfunction validateTextareaProps(element, props) {\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n\n if (props.children != null && props.value == null) {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n }\n}\nfunction updateTextarea(element, value, defaultValue) {\n var node = element;\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(getToStringValue(value)); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n } // TOOO: This should respect disableInputAttributeSyncing flag.\n\n\n if (defaultValue == null) {\n if (node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n\n return;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(getToStringValue(defaultValue));\n } else {\n node.defaultValue = '';\n }\n}\nfunction initTextarea(element, value, defaultValue, children) {\n var node = element;\n var initialValue = value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n if (children != null) {\n {\n if (defaultValue != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n var stringValue = getToStringValue(initialValue);\n node.defaultValue = stringValue; // This will be toString:ed.\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === stringValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledTextareaState(element, props) {\n // DOM component is still mounted; update\n updateTextarea(element, props.value, props.defaultValue);\n}\n\n// This validation code was written based on the HTML5 parsing spec:\n// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n//\n// Note: this does not catch all invalid nesting, nor does it try to (as it's\n// not clear what practical benefit doing so provides); instead, we warn only\n// for cases where the parser will give a parse tree differing from what React\n// intended. For example, <b><div></div></b> is invalid but we don't warn\n// because it still parses correctly; we do warn for other cases like nested\n// <p> tags where the beginning of the second element implicitly closes the\n// first, causing a confusing mess.\n// https://html.spec.whatwg.org/multipage/syntax.html#special\nvar specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\nvar inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n// TODO: Distinguish by namespace here -- for <title>, including it here\n// errs on the side of fewer warnings\n'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\nvar buttonScopeTags = inScopeTags.concat(['button']) ; // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\nvar impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\nvar emptyAncestorInfoDev = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null,\n containerTagInScope: null\n};\n\nfunction updatedAncestorInfoDev(oldInfo, tag) {\n {\n var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n if (tag === '#document' || tag === 'html') {\n ancestorInfo.containerTagInScope = null;\n } else if (!ancestorInfo.containerTagInScope) {\n ancestorInfo.containerTagInScope = info;\n }\n\n return ancestorInfo;\n }\n}\n/**\n * Returns whether\n */\n\n\nfunction isTagValidWithParent(tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n}\n/**\n * Returns whether\n */\n\n\nfunction findInvalidAncestorForTag(tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n}\n\nvar didWarn$1 = {};\n\nfunction validateDOMNesting(childTag, ancestorInfo) {\n {\n ancestorInfo = ancestorInfo || emptyAncestorInfoDev;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = // eslint-disable-next-line react-internal/safe-string-coercion\n String(!!invalidParent) + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = '<' + childTag + '>';\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s', tagDisplayName, ancestorTag, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n }\n}\n\nfunction validateTextNesting(childText, parentTag) {\n {\n if (isTagValidWithParent('#text', parentTag)) {\n return;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var warnKey = '#text|' + parentTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n\n if (/\\S/.test(childText)) {\n error('validateDOMNesting(...): Text nodes cannot appear as a child of <%s>.', parentTag);\n } else {\n error('validateDOMNesting(...): Whitespace text nodes cannot appear as a child of <%s>. ' + \"Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.', parentTag);\n }\n }\n}\n\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nvar reusableSVGContainer;\n\nfunction setInnerHTMLImpl(node, html) {\n if (node.namespaceURI === SVG_NAMESPACE) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n } // $FlowFixMe[incompatible-use]\n // $FlowFixMe[incompatible-type]\n\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n}\n\nvar setInnerHTML = setInnerHTMLImpl; // $FlowFixMe[cannot-resolve-name]\n\nif (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n /**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n setInnerHTML = function (node, html) {\n // $FlowFixMe[cannot-resolve-name]\n return MSApp.execUnsafeLocalFunction(function () {\n return setInnerHTMLImpl(node, html);\n });\n };\n}\n\nvar setInnerHTML$1 = setInnerHTML;\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nfunction setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n}\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern$1 = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-');\n}\n\n// 'msTransform' is correct, but the other prefixes should be capitalized\nvar badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\nvar msPattern = /^-ms-/;\nvar hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\nvar badStyleValueWithSemicolonPattern = /;\\s*$/;\nvar warnedStyleNames = {};\nvar warnedStyleValues = {};\nvar warnedForNaNValue = false;\nvar warnedForInfinityValue = false;\n\nfunction camelize(string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nfunction warnHyphenatedStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern, 'ms-')));\n }\n}\n\nfunction warnBadVendoredStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n }\n}\n\nfunction warnStyleValueWithSemicolon(name, value) {\n {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n }\n}\n\nfunction warnStyleValueIsNaN(name, value) {\n {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnStyleValueIsInfinity(name, value) {\n {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnValidStyle(name, value) {\n {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name);\n }\n }\n }\n}\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties\n'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties\n'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code\n'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']);\nfunction isUnitlessNumber (name) {\n return unitlessNumbers.has(name);\n}\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var value = styles[styleName];\n\n if (value != null && typeof value !== 'boolean' && value !== '') {\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n serialized += delimiter + styleName + ':' + ('' + value).trim();\n } else {\n if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {\n serialized += delimiter + hyphenateStyleName(styleName) + ':' + value + 'px';\n } else {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n serialized += delimiter + hyphenateStyleName(styleName) + ':' + ('' + value).trim();\n }\n }\n\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n\nfunction setValueForStyle(style, styleName, value) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle(styleName, value);\n }\n }\n\n if (value == null || typeof value === 'boolean' || value === '') {\n if (isCustomProperty) {\n style.setProperty(styleName, '');\n } else if (styleName === 'float') {\n style.cssFloat = '';\n } else {\n style[styleName] = '';\n }\n } else if (isCustomProperty) {\n style.setProperty(styleName, value);\n } else if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {\n style[styleName] = value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n } else {\n if (styleName === 'float') {\n style.cssFloat = value;\n } else {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n style[styleName] = ('' + value).trim();\n }\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\n\nfunction setValueForStyles(node, styles, prevStyles) {\n if (styles != null && typeof styles !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n {\n if (styles) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(styles);\n }\n }\n\n var style = node.style;\n\n {\n for (var _styleName2 in styles) {\n if (styles.hasOwnProperty(_styleName2)) {\n var _value = styles[_styleName2];\n setValueForStyle(style, _styleName2, _value);\n }\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(prevStyles, nextStyles) {\n {\n if (!nextStyles) {\n return;\n } // Compute the diff as it would happen elsewhere.\n\n\n var expandedUpdates = {};\n\n if (prevStyles) {\n for (var key in prevStyles) {\n if (prevStyles.hasOwnProperty(key) && !nextStyles.hasOwnProperty(key)) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expandedUpdates[longhands[i]] = key;\n }\n }\n }\n }\n\n for (var _key in nextStyles) {\n if (nextStyles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== nextStyles[_key])) {\n var _longhands = shorthandToLonghand[_key] || [_key];\n\n for (var _i = 0; _i < _longhands.length; _i++) {\n expandedUpdates[_longhands[_i]] = _key;\n }\n }\n }\n\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var _key2 in expandedUpdates) {\n var originalKey = expandedUpdates[_key2];\n var correctOriginalKey = expandedStyles[_key2];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(nextStyles[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\nfunction isCustomElement(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return false;\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\nvar aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.],\n['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing.\n// Regular attributes that just accept strings.],\n['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]);\nfunction getAttributeAlias (name) {\n return aliases.get(name) || name;\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n fetchpriority: 'fetchPriority',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n transformorigin: 'transformOrigin',\n 'transform-origin': 'transformOrigin',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties$1 = {};\nvar rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty$1(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n if (rARIACamel$1.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties$1[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n\n if (rARIA$1.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties$1[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction validateProperties$2(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar warnedProperties = {};\nvar EVENT_NAME_REGEX = /^on./;\nvar INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ;\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ;\n\nfunction validateProperty(tagName, name, value, eventRegistry) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA.test(name) || rARIACamel.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties[name] = true;\n return true;\n } // Known attributes should match the casing specified in the property config.\n\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n switch (name) {\n case 'dangerouslySetInnerHTML':\n case 'children':\n case 'style':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n {\n return true;\n }\n\n }\n\n switch (typeof value) {\n case 'boolean':\n {\n switch (name) {\n case 'autoFocus':\n case 'checked':\n case 'multiple':\n case 'muted':\n case 'selected':\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n case 'capture':\n case 'download':\n {\n // Boolean properties can accept boolean values\n return true;\n }\n\n default:\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix === 'data-' || prefix === 'aria-') {\n return true;\n }\n\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n case 'function':\n case 'symbol':\n // eslint-disable-line\n // Warn when a known attribute is a bad type\n warnedProperties[name] = true;\n return false;\n\n case 'string':\n {\n // Warn when passing the strings 'false' or 'true' into a boolean prop\n if (value === 'false' || value === 'true') {\n switch (name) {\n case 'checked':\n case 'selected':\n case 'multiple':\n case 'muted':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n break;\n }\n\n default:\n {\n return true;\n }\n }\n\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n }\n}\n\nfunction warnUnknownProperties(type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props, eventRegistry) {\n if (isCustomElement(type) || typeof props.is === 'string') {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n // We should never have symbols here because they get filtered out elsewhere.\n // eslint-disable-next-line react-internal/safe-string-coercion\n var stringifiedURL = '' + url;\n\n {\n if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL));\n }\n }\n\n return url;\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n {\n if (currentReplayingEvent !== null) {\n error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n {\n if (currentReplayingEvent === null) {\n error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n return event === currentReplayingEvent;\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var props = getFiberCurrentPropsFromNode(stateNode);\n restoreControlledState(internalInstance.stateNode, internalInstance.type, props);\n }\n}\n\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags$1) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (nearestMounted === null) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n }\n }\n }\n\n if (a.alternate !== b) {\n throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (a.tag !== HostRoot) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n var tag = node.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton ) || tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n var match = findCurrentHostFiberImpl(child);\n\n if (match !== null) {\n return match;\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n var tag = node.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton ) || tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n if (child.tag !== HostPortal) {\n var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n if (match !== null) {\n return match;\n }\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe[incompatible-use] This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentNameFromFiber(workInProgress) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (contextStackCursor.current !== emptyContextObject) {\n throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n {\n var name = getComponentNameFromFiber(fiber) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {\n throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = node.return;\n } while (node !== null);\n\n throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\n// We use the existence of the state object as an indicator that the component\n// is hidden.\nvar OffscreenVisible =\n/* */\n1;\nvar OffscreenDetached =\n/* */\n2;\nvar OffscreenPassiveEffectsConnected =\n/* */\n4;\nfunction isOffscreenManual(offscreenFiber) {\n return offscreenFiber.memoizedProps !== null && offscreenFiber.memoizedProps.mode === 'manual';\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = // $FlowFixMe[method-unbinding]\ntypeof Object.is === 'function' ? Object.is : is;\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n var currentState = root.current.memoizedState;\n return currentState.isDehydrated;\n}\n\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\n\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n warnIfNotHydrating();\n return (workInProgress.flags & Forked) !== NoFlags$1;\n}\nfunction getForksAtLevel(workInProgress) {\n warnIfNotHydrating();\n return treeForkCount;\n}\nfunction getTreeId() {\n var overflow = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n // This is called right after we reconcile an array (or iterator) of child\n // fibers, because that's the only place where we know how many children in\n // the whole set without doing extra work later, or storing addtional\n // information on the fiber.\n //\n // That's why this function is separate from pushTreeId — it's called during\n // the render phase of the fork parent, not the child, which is where we push\n // the other context values.\n //\n // In the Fizz implementation this is much simpler because the child is\n // rendered in the same callstack as the parent.\n //\n // It might be better to just add a `forks` field to the Fiber type. It would\n // make this module simpler.\n warnIfNotHydrating();\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n treeContextId = 1 << restOfLength | id;\n treeContextOverflow = overflow;\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n treeContextId = 1 << length | _id;\n treeContextOverflow = _overflow;\n }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n // in its children.\n\n var returnFiber = workInProgress.return;\n\n if (returnFiber !== null) {\n var numberOfForks = 1;\n var slotIndex = 0;\n pushTreeFork(workInProgress, numberOfForks);\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n // Restore the previous values.\n // This is a bit more complicated than other context-like modules in Fiber\n // because the same Fiber may appear on the stack multiple times and for\n // different reasons. We have to keep popping until the work-in-progress is\n // no longer at the top of the stack.\n while (workInProgress === treeForkProvider) {\n treeForkProvider = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n treeForkCount = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n }\n\n while (workInProgress === treeContextProvider) {\n treeContextProvider = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextOverflow = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextId = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n }\n}\nfunction getSuspendedTreeContext() {\n warnIfNotHydrating();\n\n if (treeContextProvider !== null) {\n return {\n id: treeContextId,\n overflow: treeContextOverflow\n };\n } else {\n return null;\n }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n {\n if (!getIsHydrating()) {\n error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n }\n }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\nvar rootOrSingletonContext = false;\n\nfunction warnIfHydrating() {\n {\n if (isHydrating) {\n error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n }\n }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n {\n didSuspendOrErrorDEV = true;\n }\n}\nfunction didSuspendOrErrorWhileHydratingDEV() {\n {\n return didSuspendOrErrorDEV;\n }\n}\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n rootOrSingletonContext = true;\n return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n rootOrSingletonContext = false;\n\n if (treeContext !== null) {\n restoreSuspendedTreeContext(fiber, treeContext);\n }\n\n return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n break;\n }\n }\n }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n warnUnhydratedInstance(returnFiber, instance);\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n}\n\nfunction warnNonhydratedInstance(returnFiber, fiber) {\n {\n if (didSuspendOrErrorDEV) {\n // Inside a boundary that already suspended. We're currently rendering the\n // siblings of a suspended node. The mismatch may be due to the missing\n // data, so it's probably a false positive.\n return;\n }\n\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n var type = fiber.type;\n didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n {\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case HostText:\n {\n var _text = fiber.pendingProps;\n\n var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode);\n break;\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n var _parentInstance = suspenseState.dehydrated;\n if (_parentInstance !== null) switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n var _type2 = fiber.type;\n didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n break;\n\n case HostText:\n var _text2 = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n break;\n }\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n warnNonhydratedInstance(returnFiber, fiber);\n}\n\nfunction tryHydrateInstance(fiber, nextInstance) {\n // fiber is a HostComponent Fiber\n var instance = canHydrateInstance(nextInstance, fiber.type, fiber.pendingProps, rootOrSingletonContext);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(instance);\n rootOrSingletonContext = false;\n return true;\n }\n\n return false;\n}\n\nfunction tryHydrateText(fiber, nextInstance) {\n // fiber is a HostText Fiber\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text, rootOrSingletonContext);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n}\n\nfunction tryHydrateSuspense(fiber, nextInstance) {\n // fiber is a SuspenseComponent Fiber\n var suspenseInstance = canHydrateSuspenseInstance(nextInstance, rootOrSingletonContext);\n\n if (suspenseInstance !== null) {\n var suspenseState = {\n dehydrated: suspenseInstance,\n treeContext: getSuspendedTreeContext(),\n retryLane: OffscreenLane\n };\n fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n // This simplifies the code for getHostSibling and deleting nodes,\n // since it doesn't have to consider all Suspense boundaries and\n // check if they're dehydrated ones or not.\n\n var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n dehydratedFragment.return = fiber;\n fiber.child = dehydratedFragment;\n hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n // it during the first pass. Instead, we'll reenter it later.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags$1;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction claimHydratableSingleton(fiber) {\n {\n if (!isHydrating) {\n return;\n }\n\n var currentRootContainer = getRootHostContainer();\n var currentHostContext = getHostContext();\n var instance = fiber.stateNode = resolveSingletonInstance(fiber.type, fiber.pendingProps, currentRootContainer, currentHostContext, false);\n hydrationParentFiber = fiber;\n rootOrSingletonContext = true;\n nextHydratableInstance = getFirstHydratableChild(instance);\n }\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateInstance(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateInstance(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction tryToClaimNextHydratableTextInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var text = fiber.pendingProps;\n var isHydratable = isHydratableText(text);\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance || !isHydratable) {\n // We exclude non hydrabable text because we know there are no matching hydratables.\n // We either throw or insert depending on the render mode.\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateText(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateText(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction tryToClaimNextHydratableSuspenseInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateSuspense(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateSuspense(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction prepareToHydrateHostInstance(fiber, hostContext) {\n\n var instance = fiber.stateNode;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.\n\n {\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode, shouldWarnIfMismatchDev);\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent mode we never update the mismatched text,\n // even if the error was ignored.\n return false;\n }\n\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode2, shouldWarnIfMismatchDev);\n\n if (_isConcurrentMode2 && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent mode we never update the mismatched text,\n // even if the error was ignored.\n return false;\n }\n\n break;\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n hydrationParentFiber = fiber.return;\n\n while (hydrationParentFiber) {\n switch (hydrationParentFiber.tag) {\n case HostRoot:\n case HostSingleton:\n rootOrSingletonContext = true;\n return;\n\n case HostComponent:\n case SuspenseComponent:\n rootOrSingletonContext = false;\n return;\n\n default:\n hydrationParentFiber = hydrationParentFiber.return;\n }\n }\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var shouldClear = false;\n\n {\n // With float we never clear the Root, or Singleton instances. We also do not clear Instances\n // that have singleton text content\n if (fiber.tag !== HostRoot && fiber.tag !== HostSingleton && !(fiber.tag === HostComponent && (shouldSetTextContent(fiber.type, fiber.memoizedProps)))) {\n shouldClear = true;\n }\n }\n\n if (shouldClear) {\n var nextInstance = nextHydratableInstance;\n\n if (nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnIfUnhydratedTailNodes(fiber);\n throwOnHydrationMismatch();\n } else {\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction hasUnhydratedTailNodes() {\n return isHydrating && nextHydratableInstance !== null;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n if (hydrationErrors !== null) {\n // Successfully completed a forced client render. The errors that occurred\n // during the hydration attempt are now recovered. We will log them in\n // commit phase, once the entire tree has finished.\n queueRecoverableErrors(hydrationErrors);\n hydrationErrors = null;\n }\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n if (hydrationErrors === null) {\n hydrationErrors = [error];\n } else {\n hydrationErrors.push(error);\n }\n}\n\n// we wait until the current render is over (either finished or interrupted)\n// before adding it to the fiber/hook queue. Push to this array so we can\n// access the queue, fiber, update, et al later.\n\nvar concurrentQueues = [];\nvar concurrentQueuesIndex = 0;\nvar concurrentlyUpdatedLanes = NoLanes;\nfunction finishQueueingConcurrentUpdates() {\n var endIndex = concurrentQueuesIndex;\n concurrentQueuesIndex = 0;\n concurrentlyUpdatedLanes = NoLanes;\n var i = 0;\n\n while (i < endIndex) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n\n if (queue !== null && update !== null) {\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n }\n\n if (lane !== NoLane) {\n markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n }\n}\nfunction getConcurrentlyUpdatedLanes() {\n return concurrentlyUpdatedLanes;\n}\n\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n // Don't update the `childLanes` on the return path yet. If we already in\n // the middle of rendering, wait until after it has completed.\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes = mergeLanes(concurrentlyUpdatedLanes, lane); // The fiber's `lane` field is used in some places to check if any work is\n // scheduled, to perform an eager bailout, so we need to update it immediately.\n // TODO: We should probably move this to the \"shared\" queue instead.\n\n fiber.lanes = mergeLanes(fiber.lanes, lane);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n}\n\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update) {\n // This function is used to queue an update that doesn't need a rerender. The\n // only reason we queue it is in case there's a subsequent higher priority\n // update that causes it to be rebased.\n var lane = NoLane;\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane); // Usually we can rely on the upcoming render phase to process the concurrent\n // queue. However, since this is a bail out, we're not scheduling any work\n // here. So the update we just queued will leak until something else happens\n // to schedule work (if ever).\n //\n // Check if we're currently in the middle of rendering a tree, and if not,\n // process the queue immediately to prevent a leak.\n\n var isConcurrentlyRendering = getWorkInProgressRoot() !== null;\n\n if (!isConcurrentlyRendering) {\n finishQueueingConcurrentUpdates();\n }\n}\nfunction enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n} // Calling this function outside this module should only be done for backwards\n// compatibility and should always be accompanied by a warning.\n\nfunction unsafe_markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // NOTE: For Hyrum's Law reasons, if an infinite update loop is detected, it\n // should throw before `markUpdateLaneFromFiberToRoot` is called. But this is\n // undefined behavior and we can change it if we need to; it just so happens\n // that, at the time of this writing, there's an internal product test that\n // happens to rely on this.\n var root = getRootForUpdatedFiber(sourceFiber);\n markUpdateLaneFromFiberToRoot(sourceFiber, null, lane);\n return root;\n}\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n } // Walk the parent path to the root and update the child lanes.\n\n\n var isHidden = false;\n var parent = sourceFiber.return;\n var node = sourceFiber;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n }\n\n if (parent.tag === OffscreenComponent) {\n // Check if this offscreen boundary is currently hidden.\n //\n // The instance may be null if the Offscreen parent was unmounted. Usually\n // the parent wouldn't be reachable in that case because we disconnect\n // fibers from the tree when they are deleted. However, there's a weird\n // edge case where setState is called on a fiber that was interrupted\n // before it ever mounted. Because it never mounts, it also never gets\n // deleted. Because it never gets deleted, its return pointer never gets\n // disconnected. Which means it may be attached to a deleted Offscreen\n // parent node. (This discovery suggests it may be better for memory usage\n // if we don't attach the `return` pointer until the commit phase, though\n // in order to do that we'd need some other way to track the return\n // pointer during the initial render, like on the stack.)\n //\n // This case is always accompanied by a warning, but we still need to\n // account for it. (There may be other cases that we haven't discovered,\n // too.)\n var offscreenInstance = parent.stateNode;\n\n if (offscreenInstance !== null && !(offscreenInstance._visibility & OffscreenVisible)) {\n isHidden = true;\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (isHidden && update !== null && node.tag === HostRoot) {\n var root = node.stateNode;\n markHiddenUpdate(root, update, lane);\n }\n}\n\nfunction getRootForUpdatedFiber(sourceFiber) {\n // TODO: We will detect and infinite update loop and throw even if this fiber\n // has already unmounted. This isn't really necessary but it happens to be the\n // current behavior we've used for several release cycles. Consider not\n // performing this check if the updated fiber already unmounted, since it's\n // not possible for that to cause an infinite update loop.\n throwIfInfiniteUpdateLoopDetected(); // When a setState happens, we must ensure the root is scheduled. Because\n // update queues do not have a backpointer to the root, the only way to do\n // this currently is to walk up the return path. This used to not be a big\n // deal because we would have to walk up the return path to set\n // the `childLanes`, anyway, but now those two traversals happen at\n // different times.\n // TODO: Consider adding a `root` backpointer on the update queue.\n\n detectUpdateOnUnmountedFiber(sourceFiber, sourceFiber);\n var node = sourceFiber;\n var parent = node.return;\n\n while (parent !== null) {\n detectUpdateOnUnmountedFiber(sourceFiber, node);\n node = parent;\n parent = node.return;\n }\n\n return node.tag === HostRoot ? node.stateNode : null;\n}\n\nfunction detectUpdateOnUnmountedFiber(sourceFiber, parent) {\n {\n var alternate = parent.alternate;\n\n if (alternate === null && (parent.flags & (Placement | Hydrating)) !== NoFlags$1) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n lanes: NoLanes,\n hiddenCallbacks: null\n },\n callbacks: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n callbacks: null\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(lane) {\n var update = {\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return null;\n }\n\n var sharedQueue = updateQueue.shared;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n var componentName = getComponentNameFromFiber(fiber);\n\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.\\n\\nPlease update the following component: %s', componentName);\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n\n if (isUnsafeClassRenderPhaseUpdate()) {\n // This is an unsafe render phase update. Add directly to the update\n // queue so we can process it immediately during the current render.\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering\n // this fiber. This is for backwards compatibility in the case where you\n // update a different component during render phase than the one that is\n // currently renderings (a pattern that is accompanied by a warning).\n\n return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n } else {\n return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n }\n}\nfunction entangleTransitions(root, fiber, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n\n if (isTransitionLane(lane)) {\n var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n // have finished. We can remove them from the shared queue, which represents\n // a superset of the actually pending lanes. In some cases we may entangle\n // more than we need to, but that's OK. In fact it's worse if we *don't*\n // entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n // When this update is rebased, we should not fire its\n // callback again.\n callback: null,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n callbacks: currentQueue.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n // An extra OffscreenLane bit is added to updates that were made to\n // a hidden tree, so that we can distinguish them from updates that were\n // already there when the tree was hidden.\n var updateLane = removeLanes(update.lane, OffscreenLane);\n var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then\n // it's not a \"base\" update and we should disregard the extra base lanes\n // that were added to renderLanes when we entered the Offscreen tree.\n\n var shouldSkipUpdate = isHiddenUpdate ? !isSubsetOfLanes(getWorkInProgressRootRenderLanes(), updateLane) : !isSubsetOfLanes(renderLanes, updateLane);\n\n if (shouldSkipUpdate) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n // When this update is rebased, we should not fire its\n // callback again.\n callback: null,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.flags |= Callback;\n\n if (isHiddenUpdate) {\n workInProgress.flags |= Visibility;\n }\n\n var callbacks = queue.callbacks;\n\n if (callbacks === null) {\n queue.callbacks = [callback];\n } else {\n callbacks.push(callback);\n }\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate;\n\n if (firstBaseUpdate === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.shared.lanes = NoLanes;\n } // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (typeof callback !== 'function') {\n throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction deferHiddenCallbacks(updateQueue) {\n // When an update finishes on a hidden component, its callback should not\n // be fired until/unless the component is made visible again. Stash the\n // callback on the shared queue object so it can be fired later.\n var newHiddenCallbacks = updateQueue.callbacks;\n\n if (newHiddenCallbacks !== null) {\n var existingHiddenCallbacks = updateQueue.shared.hiddenCallbacks;\n\n if (existingHiddenCallbacks === null) {\n updateQueue.shared.hiddenCallbacks = newHiddenCallbacks;\n } else {\n updateQueue.shared.hiddenCallbacks = existingHiddenCallbacks.concat(newHiddenCallbacks);\n }\n }\n}\nfunction commitHiddenCallbacks(updateQueue, context) {\n // This component is switching from hidden -> visible. Commit any callbacks\n // that were previously deferred.\n var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;\n\n if (hiddenCallbacks !== null) {\n updateQueue.shared.hiddenCallbacks = null;\n\n for (var i = 0; i < hiddenCallbacks.length; i++) {\n var callback = hiddenCallbacks[i];\n callCallback(callback, context);\n }\n }\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n\n if (callbacks !== null) {\n updateQueue.callbacks = null;\n\n for (var i = 0; i < callbacks.length; i++) {\n var callback = callbacks[i];\n callCallback(callback, context);\n }\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n var currentKey = keysA[i];\n\n if (!hasOwnProperty.call(objB, currentKey) || // $FlowFixMe[incompatible-use] lost refinement of `objB`\n !objectIs(objA[currentKey], objB[currentKey])) {\n return false;\n }\n }\n\n return true;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictLegacyMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedupe strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nvar ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we\n// detect this is caught by userspace, we'll log a warning in development.\n\nvar SuspenseException = new Error(\"Suspense Exception: This is not a real error! It's an implementation \" + 'detail of `use` to interrupt the current render. You must either ' + 'rethrow it immediately, or move the `use` call outside of the ' + '`try/catch` block. Capturing without rethrowing will lead to ' + 'unexpected behavior.\\n\\n' + 'To handle async errors, wrap your component in an error boundary, or ' + \"call the promise's `.catch` method and pass the result to `use`\");\nvar SuspenseyCommitException = new Error('Suspense Exception: This is not a real error, and should not leak into ' + \"userspace. If you're seeing this, it's likely a bug in React.\"); // This is a noop thenable that we use to trigger a fallback in throwException.\n// TODO: It would be better to refactor throwException into multiple functions\n// so we can trigger a fallback directly without having to check the type. But\n// for now this will do.\n\nvar noopSuspenseyCommitThenable = {\n then: function () {}\n};\nfunction createThenableState() {\n // The ThenableState is created the first time a component suspends. If it\n // suspends again, we'll reuse the same state.\n return [];\n}\nfunction isThenableResolved(thenable) {\n var status = thenable.status;\n return status === 'fulfilled' || status === 'rejected';\n}\n\nfunction noop$2() {}\n\nfunction trackUsedThenable(thenableState, thenable, index) {\n if (ReactCurrentActQueue$3.current !== null) {\n ReactCurrentActQueue$3.didUsePromise = true;\n }\n\n var previous = thenableState[index];\n\n if (previous === undefined) {\n thenableState.push(thenable);\n } else {\n if (previous !== thenable) {\n // Reuse the previous thenable, and drop the new one. We can assume\n // they represent the same value, because components are idempotent.\n // Avoid an unhandled rejection errors for the Promises that we'll\n // intentionally ignore.\n thenable.then(noop$2, noop$2);\n thenable = previous;\n }\n } // We use an expando to track the status and result of a thenable so that we\n // can synchronously unwrap the value. Think of this as an extension of the\n // Promise API, or a custom interface that is a superset of Thenable.\n //\n // If the thenable doesn't have a status, set it to \"pending\" and attach\n // a listener that will update its status and result when it resolves.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledValue = thenable.value;\n return fulfilledValue;\n }\n\n case 'rejected':\n {\n var rejectedError = thenable.reason;\n checkIfUseWrappedInAsyncCatch(rejectedError);\n throw rejectedError;\n }\n\n default:\n {\n if (typeof thenable.status === 'string') {\n // Only instrument the thenable if the status if not defined. If\n // it's defined, but an unknown value, assume it's been instrumented by\n // some custom userspace implementation. We treat it as \"pending\".\n // Attach a dummy listener, to ensure that any lazy initialization can\n // happen. Flight lazily parses JSON when the value is actually awaited.\n thenable.then(noop$2, noop$2);\n } else {\n // This is an uncached thenable that we haven't seen before.\n // Detect infinite ping loops caused by uncached promises.\n var root = getWorkInProgressRoot();\n\n if (root !== null && root.shellSuspendCounter > 100) {\n // This root has suspended repeatedly in the shell without making any\n // progress (i.e. committing something). This is highly suggestive of\n // an infinite ping loop, often caused by an accidental Async Client\n // Component.\n //\n // During a transition, we can suspend the work loop until the promise\n // to resolve, but this is a sync render, so that's not an option. We\n // also can't show a fallback, because none was provided. So our last\n // resort is to throw an error.\n //\n // TODO: Remove this error in a future release. Other ways of handling\n // this case include forcing a concurrent render, or putting the whole\n // root into offscreen mode.\n throw new Error('async/await is not yet supported in Client Components, only ' + 'Server Components. This error is often caused by accidentally ' + \"adding `'use client'` to a module that was originally written \" + 'for the server.');\n }\n\n var pendingThenable = thenable;\n pendingThenable.status = 'pending';\n pendingThenable.then(function (fulfilledValue) {\n if (thenable.status === 'pending') {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = fulfilledValue;\n }\n }, function (error) {\n if (thenable.status === 'pending') {\n var rejectedThenable = thenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n }\n }); // Check one more time in case the thenable resolved synchronously.\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledThenable = thenable;\n return fulfilledThenable.value;\n }\n\n case 'rejected':\n {\n var rejectedThenable = thenable;\n var _rejectedError = rejectedThenable.reason;\n checkIfUseWrappedInAsyncCatch(_rejectedError);\n throw _rejectedError;\n }\n }\n } // Suspend.\n //\n // Throwing here is an implementation detail that allows us to unwind the\n // call stack. But we shouldn't allow it to leak into userspace. Throw an\n // opaque placeholder value instead of the actual thenable. If it doesn't\n // get captured by the work loop, log a warning, because that means\n // something in userspace must have caught it.\n\n\n suspendedThenable = thenable;\n\n {\n needsToResetSuspendedThenableDEV = true;\n }\n\n throw SuspenseException;\n }\n }\n}\nfunction suspendCommit() {\n // This extra indirection only exists so it can handle passing\n // noopSuspenseyCommitThenable through to throwException.\n // TODO: Factor the thenable check out of throwException\n suspendedThenable = noopSuspenseyCommitThenable;\n throw SuspenseyCommitException;\n} // This is used to track the actual thenable that suspended so it can be\n// passed to the rest of the Suspense implementation — which, for historical\n// reasons, expects to receive a thenable.\n\nvar suspendedThenable = null;\nvar needsToResetSuspendedThenableDEV = false;\nfunction getSuspendedThenable() {\n // This is called right after `use` suspends by throwing an exception. `use`\n // throws an opaque value instead of the thenable itself so that it can't be\n // caught in userspace. Then the work loop accesses the actual thenable using\n // this function.\n if (suspendedThenable === null) {\n throw new Error('Expected a suspended thenable. This is a bug in React. Please file ' + 'an issue.');\n }\n\n var thenable = suspendedThenable;\n suspendedThenable = null;\n\n {\n needsToResetSuspendedThenableDEV = false;\n }\n\n return thenable;\n}\nfunction checkIfUseWrappedInTryCatch() {\n {\n // This was set right before SuspenseException was thrown, and it should\n // have been cleared when the exception was handled. If it wasn't,\n // it must have been caught by userspace.\n if (needsToResetSuspendedThenableDEV) {\n needsToResetSuspendedThenableDEV = false;\n return true;\n }\n }\n\n return false;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n // This check runs in prod, too, because it prevents a more confusing\n // downstream error, where SuspenseException is caught by a promise and\n // thrown asynchronously.\n // TODO: Another way to prevent SuspenseException from leaking into an async\n // execution context is to check the dispatcher every time `use` is called,\n // or some equivalent. That might be preferable for other reasons, too, since\n // it matches how we prevent similar mistakes for other hooks.\n if (rejectedReason === SuspenseException) {\n throw new Error('Hooks are not supported inside an async component. This ' + \"error is often caused by accidentally adding `'use client'` \" + 'to a module that was originally written for the server.');\n }\n}\n\nvar thenableState$1 = null;\nvar thenableIndexCounter$1 = 0;\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (typeof child._store !== 'object') {\n throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n } // $FlowFixMe[cannot-write] unable to narrow type from mixed to writable object\n\n\n child._store.validated = true;\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n\n if (thenableState$1 === null) {\n thenableState$1 = createThenableState();\n }\n\n return trackUsedThenable(thenableState$1, thenable, index);\n}\n\nfunction coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n if ( // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with \"Function components cannot have string refs\"\n !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with \"Function components cannot be given refs\"\n !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with \"Element ref was specified as a string (someStringRef) but no owner was set\"\n element._owner) {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (ownerFiber.tag !== ClassComponent) {\n throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n } // Assigning this to a const so Flow knows it won't change in the closure\n\n\n var resolvedInst = inst;\n\n {\n checkPropStringCoercion(mixedRef, 'ref');\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = resolvedInst.refs;\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (typeof mixedRef !== 'string') {\n throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n }\n\n if (!element._owner) {\n throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n // $FlowFixMe[method-unbinding]\n var childString = Object.prototype.toString.call(newChild);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = true;\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n}\n\nfunction resolveLazy(lazyType) {\n var payload = lazyType._payload;\n var init = lazyType._init;\n return init(payload);\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // During hydration, the useId algorithm needs to know which fibers are\n // part of a list of children (arrays, iterators).\n newFiber.flags |= Forked;\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags |= Placement | PlacementDEV;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags |= Placement | PlacementDEV;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags |= Placement | PlacementDEV;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n }\n\n if (current !== null) {\n if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return createChild(returnFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return createChild(returnFiber, unwrapThenable(thenable), lanes);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE || newChild.$$typeof === REACT_SERVER_CONTEXT_TYPE) {\n var context = newChild;\n return createChild(returnFiber, readContextDuringReconcilation(returnFiber, context, lanes), lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return updateSlot(returnFiber, oldFiber, unwrapThenable(thenable), lanes);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE || newChild.$$typeof === REACT_SERVER_CONTEXT_TYPE) {\n var context = newChild;\n return updateSlot(returnFiber, oldFiber, readContextDuringReconcilation(returnFiber, context, lanes), lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return updateFromMap(existingChildren, returnFiber, newIdx, unwrapThenable(thenable), lanes);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE || newChild.$$typeof === REACT_SERVER_CONTEXT_TYPE) {\n var context = newChild;\n return updateFromMap(existingChildren, returnFiber, newIdx, readContextDuringReconcilation(returnFiber, context, lanes), lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n\n case REACT_LAZY_TYPE:\n var payload = child._payload;\n var init = child._init;\n warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks = newIdx;\n pushTreeFork(returnFiber, _numberOfForks);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks2 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks2);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (typeof iteratorFn !== 'function') {\n throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe[prop-missing] Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (newChildren == null) {\n throw new Error('An iterable object provided no iterator.');\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks3 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks3);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks4 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks4);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n if (child.tag === Fragment) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } else {\n if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing = useFiber(child, element.props);\n\n _existing.ref = coerceRef(returnFiber, child, element);\n _existing.return = returnFiber;\n\n {\n _existing._debugSource = element._source;\n _existing._debugOwner = element._owner;\n }\n\n return _existing;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n // TODO: Let's use recursion like we do for Usable nodes?\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n } // Usables are a valid React node type. When React encounters a Usable in\n // a child position, it unwraps it using the same algorithm as `use`. For\n // example, for promises, React will throw an exception to unwind the\n // stack, then replay the component once the promise resolves.\n //\n // A difference from `use` is that React will keep unwrapping the value\n // until it reaches a non-Usable type.\n //\n // e.g. Usable<Usable<Usable<T>>> should resolve to T\n //\n // The structure is a bit unfortunate. Ideally, we shouldn't need to\n // replay the entire begin phase of the parent fiber in order to reconcile\n // the children again. This would require a somewhat significant refactor,\n // because reconcilation happens deep within the begin phase, and\n // depending on the type of work, not always at the end. We should\n // consider as an future improvement.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return reconcileChildFibersImpl(returnFiber, currentFirstChild, unwrapThenable(thenable), lanes);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE || newChild.$$typeof === REACT_SERVER_CONTEXT_TYPE) {\n var context = newChild;\n return reconcileChildFibersImpl(returnFiber, currentFirstChild, readContextDuringReconcilation(returnFiber, context, lanes), lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This indirection only exists so we can reset `thenableState` at the end.\n // It should get inlined by Closure.\n thenableIndexCounter$1 = 0;\n var firstChildFiber = reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes);\n thenableState$1 = null; // Don't bother to reset `thenableIndexCounter` to 0 because it always gets\n // set at the beginning.\n\n return firstChildFiber;\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = createChildReconciler(true);\nvar mountChildFibers = createChildReconciler(false);\nfunction resetChildReconcilerOnUnwind() {\n // On unwind, clear any pending thenables that were used.\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n}\nfunction cloneChildFibers(current, workInProgress) {\n if (current !== null && workInProgress.child !== current.child) {\n throw new Error('Resuming work not yet implemented.');\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n}\n\n// TODO: This isn't being used yet, but it's intended to replace the\n// InvisibleParentContext that is currently managed by SuspenseContext.\n\nvar currentTreeHiddenStackCursor = createCursor(null);\nvar prevRenderLanesStackCursor = createCursor(NoLanes);\nfunction pushHiddenContext(fiber, context) {\n var prevRenderLanes = getRenderLanes();\n push(prevRenderLanesStackCursor, prevRenderLanes, fiber);\n push(currentTreeHiddenStackCursor, context, fiber); // When rendering a subtree that's currently hidden, we must include all\n // lanes that would have rendered if the hidden subtree hadn't been deferred.\n // That is, in order to reveal content from hidden -> visible, we must commit\n // all the updates that we skipped when we originally hid the tree.\n\n setRenderLanes(mergeLanes(prevRenderLanes, context.baseLanes));\n}\nfunction reuseHiddenContextOnStack(fiber) {\n // This subtree is not currently hidden, so we don't need to add any lanes\n // to the render lanes. But we still need to push something to avoid a\n // context mismatch. Reuse the existing context on the stack.\n push(prevRenderLanesStackCursor, getRenderLanes(), fiber);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current, fiber);\n}\nfunction popHiddenContext(fiber) {\n // Restore the previous render lanes from the stack\n setRenderLanes(prevRenderLanesStackCursor.current);\n pop(currentTreeHiddenStackCursor, fiber);\n pop(prevRenderLanesStackCursor, fiber);\n}\nfunction isCurrentTreeHidden() {\n return currentTreeHiddenStackCursor.current !== null;\n}\n\n// suspends, i.e. it's the nearest `catch` block on the stack.\n\nvar suspenseHandlerStackCursor = createCursor(null); // Represents the outermost boundary that is not visible in the current tree.\n// Everything above this is the \"shell\". When this is null, it means we're\n// rendering in the shell of the app. If it's non-null, it means we're rendering\n// deeper than the shell, inside a new tree that wasn't already visible.\n//\n// The main way we use this concept is to determine whether showing a fallback\n// would result in a desirable or undesirable loading state. Activing a fallback\n// in the shell is considered an undersirable loading state, because it would\n// mean hiding visible (albeit stale) content in the current tree — we prefer to\n// show the stale content, rather than switch to a fallback. But showing a\n// fallback in a new tree is fine, because there's no stale content to\n// prefer instead.\n\nvar shellBoundary = null;\nfunction getShellBoundary() {\n return shellBoundary;\n}\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n // TODO: Pass as argument\n var current = handler.alternate;\n // propagated a single level. For example, when ForceSuspenseFallback is set,\n // it should only force the nearest Suspense boundary into fallback mode.\n\n pushSuspenseListContext(handler, setDefaultShallowSuspenseListContext(suspenseStackCursor.current)); // Experimental feature: Some Suspense boundaries are marked as having an\n // to push a nested Suspense handler, because it will get replaced by the\n // outer fallback, anyway. Consider this as a future optimization.\n\n\n push(suspenseHandlerStackCursor, handler, handler);\n\n if (shellBoundary === null) {\n if (current === null || isCurrentTreeHidden()) {\n // This boundary is not visible in the current UI.\n shellBoundary = handler;\n } else {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // This boundary is showing a fallback in the current UI.\n shellBoundary = handler;\n }\n }\n }\n}\nfunction pushFallbackTreeSuspenseHandler(fiber) {\n // We're about to render the fallback. If something in the fallback suspends,\n // it's akin to throwing inside of a `catch` block. This boundary should not\n // capture. Reuse the existing handler on the stack.\n reuseSuspenseHandlerOnStack(fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n if (fiber.tag === OffscreenComponent) {\n // A SuspenseList context is only pushed here to avoid a push/pop mismatch.\n // Reuse the current value on the stack.\n // TODO: We can avoid needing to push here by by forking popSuspenseHandler\n // into separate functions for Suspense and Offscreen.\n pushSuspenseListContext(fiber, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, fiber, fiber);\n\n if (shellBoundary !== null) ; else {\n var current = fiber.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // This is the first boundary in the stack that's already showing\n // a fallback. So everything outside is considered the shell.\n shellBoundary = fiber;\n }\n }\n }\n } else {\n // This is a LegacyHidden component.\n reuseSuspenseHandlerOnStack(fiber);\n }\n}\nfunction reuseSuspenseHandlerOnStack(fiber) {\n pushSuspenseListContext(fiber, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, getSuspenseHandler(), fiber);\n}\nfunction getSuspenseHandler() {\n return suspenseHandlerStackCursor.current;\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor, fiber);\n\n if (shellBoundary === fiber) {\n // Popping back into the shell.\n shellBoundary = null;\n }\n\n popSuspenseListContext(fiber);\n} // SuspenseList context\n// TODO: Move to a separate module? We may change the SuspenseList\n// implementation to hide/show in the commit phase, anyway.\n\nvar DefaultSuspenseContext = 0;\nvar SubtreeSuspenseContextMask = 1; // ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseListContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseListContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseListContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction pushSuspenseListContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseListContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\n// A non-null SuspenseState means that it is blocked for one reason or another.\n// - A non-null dehydrated field means it's blocked pending hydration.\n// - A non-null dehydrated field can use isSuspenseInstancePending or\n// isSuspenseInstanceFallback to query the reason for being dehydrated.\n// - A null dehydrated field means it's blocked by something suspending and\n// we're currently showing a fallback instead.\n\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nvar NoFlags =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/* */\n2;\nvar Layout =\n/* */\n4;\nvar Passive =\n/* */\n8;\n\nvar ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app,\n// there's only a single root, but we do support multi root apps, hence this\n// extra complexity. But this module is optimized for the single root case.\n\nvar firstScheduledRoot = null;\nvar lastScheduledRoot = null; // Used to prevent redundant mircotasks from being scheduled.\n\nvar didScheduleMicrotask = false; // `act` \"microtasks\" are scheduled on the `act` queue instead of an actual\n// microtask, so we have to dedupe those separately. This wouldn't be an issue\n// if we required all `act` calls to be awaited, which we might in the future.\n\nvar didScheduleMicrotask_act = false; // Used to quickly bail out of flushSync if there's no sync work to do.\n\nvar mightHavePendingSyncWork = false;\nvar isFlushingWork = false;\nvar currentEventTransitionLane = NoLane;\nfunction ensureRootIsScheduled(root) {\n // This function is called whenever a root receives an update. It does two\n // things 1) it ensures the root is in the root schedule, and 2) it ensures\n // there's a pending microtask to process the root schedule.\n //\n // Most of the actual scheduling logic does not happen until\n // `scheduleTaskForRootDuringMicrotask` runs.\n // Add the root to the schedule\n if (root === lastScheduledRoot || root.next !== null) ; else {\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n } else {\n lastScheduledRoot.next = root;\n lastScheduledRoot = root;\n }\n } // Any time a root received an update, we set this to true until the next time\n // we process the schedule. If it's false, then we can quickly exit flushSync\n // without consulting the schedule.\n\n\n mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure\n // there's a task scheduled for each one at the correct priority.\n\n if (ReactCurrentActQueue$2.current !== null) {\n // We're inside an `act` scope.\n if (!didScheduleMicrotask_act) {\n didScheduleMicrotask_act = true;\n scheduleImmediateTask(processRootScheduleInMicrotask);\n }\n } else {\n if (!didScheduleMicrotask) {\n didScheduleMicrotask = true;\n scheduleImmediateTask(processRootScheduleInMicrotask);\n }\n }\n\n if (ReactCurrentActQueue$2.isBatchingLegacy && root.tag === LegacyRoot) {\n // Special `act` case: Record whenever a legacy update is scheduled.\n ReactCurrentActQueue$2.didScheduleLegacyUpdate = true;\n }\n}\nfunction flushSyncWorkOnAllRoots() {\n // This is allowed to be called synchronously, but the caller should check\n // the execution context first.\n flushSyncWorkAcrossRoots_impl(false);\n}\nfunction flushSyncWorkOnLegacyRootsOnly() {\n // This is allowed to be called synchronously, but the caller should check\n // the execution context first.\n flushSyncWorkAcrossRoots_impl(true);\n}\n\nfunction flushSyncWorkAcrossRoots_impl(onlyLegacy) {\n if (isFlushingWork) {\n // Prevent reentrancy.\n // TODO: Is this overly defensive? The callers must check the execution\n // context first regardless.\n return;\n }\n\n if (!mightHavePendingSyncWork) {\n // Fast path. There's no sync work to do.\n return;\n }\n\n var workInProgressRoot = getWorkInProgressRoot();\n var workInProgressRootRenderLanes = getWorkInProgressRootRenderLanes(); // There may or may not be synchronous work scheduled. Let's check.\n\n var didPerformSomeWork;\n var errors = null;\n isFlushingWork = true;\n\n do {\n didPerformSomeWork = false;\n var root = firstScheduledRoot;\n\n while (root !== null) {\n if (onlyLegacy && root.tag !== LegacyRoot) ; else {\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (includesSyncLane(nextLanes)) {\n // This root has pending sync work. Flush it now.\n try {\n // TODO: Pass nextLanes as an argument instead of computing it again\n // inside performSyncWorkOnRoot.\n didPerformSomeWork = true;\n performSyncWorkOnRoot(root);\n } catch (error) {\n // Collect errors so we can rethrow them at the end\n if (errors === null) {\n errors = [error];\n } else {\n errors.push(error);\n }\n }\n }\n }\n\n root = root.next;\n }\n } while (didPerformSomeWork);\n\n isFlushingWork = false; // If any errors were thrown, rethrow them right before exiting.\n // TODO: Consider returning these to the caller, to allow them to decide\n // how/when to rethrow.\n\n if (errors !== null) {\n if (errors.length > 1) {\n if (typeof AggregateError === 'function') {\n // eslint-disable-next-line no-undef\n throw new AggregateError(errors);\n } else {\n for (var i = 1; i < errors.length; i++) {\n scheduleImmediateTask(throwError.bind(null, errors[i]));\n }\n\n var firstError = errors[0];\n throw firstError;\n }\n } else {\n var error = errors[0];\n throw error;\n }\n }\n}\n\nfunction throwError(error) {\n throw error;\n}\n\nfunction processRootScheduleInMicrotask() {\n // This function is always called inside a microtask. It should never be\n // called synchronously.\n didScheduleMicrotask = false;\n\n {\n didScheduleMicrotask_act = false;\n } // We'll recompute this as we iterate through all the roots and schedule them.\n\n\n mightHavePendingSyncWork = false;\n var currentTime = now$1();\n var prev = null;\n var root = firstScheduledRoot;\n\n while (root !== null) {\n var next = root.next;\n\n if (currentEventTransitionLane !== NoLane && shouldAttemptEagerTransition()) {\n markRootEntangled(root, mergeLanes(currentEventTransitionLane, SyncLane));\n }\n\n var nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n\n if (nextLanes === NoLane) {\n // This root has no more pending work. Remove it from the schedule. To\n // guard against subtle reentrancy bugs, this microtask is the only place\n // we do this — you can add roots to the schedule whenever, but you can\n // only remove them here.\n // Null this out so we know it's been removed from the schedule.\n root.next = null;\n\n if (prev === null) {\n // This is the new head of the list\n firstScheduledRoot = next;\n } else {\n prev.next = next;\n }\n\n if (next === null) {\n // This is the new tail of the list\n lastScheduledRoot = prev;\n }\n } else {\n // This root still has work. Keep it in the list.\n prev = root;\n\n if (includesSyncLane(nextLanes)) {\n mightHavePendingSyncWork = true;\n }\n }\n\n root = next;\n }\n\n currentEventTransitionLane = NoLane; // At the end of the microtask, flush any pending synchronous work. This has\n // to come at the end, because it does actual rendering work that might throw.\n\n flushSyncWorkOnAllRoots();\n}\n\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n // This function is always called inside a microtask, or at the very end of a\n // rendering task right before we yield to the main thread. It should never be\n // called synchronously.\n //\n // TODO: Unless enableDeferRootSchedulingToMicrotask is off. We need to land\n // that ASAP to unblock additional features we have planned.\n //\n // This function also never performs React work synchronously; it should\n // only schedule work to be performed later, in a separate task or microtask.\n // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var workInProgressRoot = getWorkInProgressRoot();\n var workInProgressRootRenderLanes = getWorkInProgressRootRenderLanes();\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n var existingCallbackNode = root.callbackNode;\n\n if ( // Check if there's nothing to work on\n nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't\n // schedule a task to render it. We'll either wait for a ping, or wait to\n // receive an update.\n //\n // Suspended render phase\n root === workInProgressRoot && isWorkLoopSuspendedOnData() || // Suspended commit phase\n root.cancelPendingCommit !== null) {\n // Fast path: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n return NoLane;\n } // Schedule a new callback in the host environment.\n\n\n if (includesSyncLane(nextLanes)) {\n // Synchronous work is always flushed at the end of the microtask, so we\n // don't need to schedule an additional task.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackPriority = SyncLane;\n root.callbackNode = null;\n return SyncLane;\n } else {\n // We use the highest priority lane to represent the priority of the callback.\n var existingCallbackPriority = root.callbackPriority;\n var newCallbackPriority = getHighestPriorityLane(nextLanes);\n\n if (newCallbackPriority === existingCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n // Scheduler task, rather than an `act` task, cancel it and re-schedule\n // on the `act` queue.\n !(ReactCurrentActQueue$2.current !== null && existingCallbackNode !== fakeActCallbackNode$1)) {\n // The priority hasn't changed. We can reuse the existing task.\n return newCallbackPriority;\n } else {\n // Cancel the existing callback. We'll schedule a new one below.\n cancelCallback(existingCallbackNode);\n }\n\n var schedulerPriorityLevel;\n\n switch (lanesToEventPriority(nextLanes)) {\n case DiscreteEventPriority:\n schedulerPriorityLevel = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriorityLevel = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriorityLevel = NormalPriority$1;\n break;\n\n case IdleEventPriority:\n schedulerPriorityLevel = IdlePriority;\n break;\n\n default:\n schedulerPriorityLevel = NormalPriority$1;\n break;\n }\n\n var newCallbackNode = scheduleCallback$2(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n return newCallbackPriority;\n }\n}\n\nfunction getContinuationForRoot(root, originalCallbackNode) {\n // This is called at the end of `performConcurrentWorkOnRoot` to determine\n // if we need to schedule a continuation task.\n //\n // Usually `scheduleTaskForRootDuringMicrotask` only runs inside a microtask;\n // however, since most of the logic for determining if we need a continuation\n // versus a new task is the same, we cheat a bit and call it here. This is\n // only safe to do because we know we're at the end of the browser task.\n // So although it's not an actual microtask, it might as well be.\n scheduleTaskForRootDuringMicrotask(root, now$1());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n}\nvar fakeActCallbackNode$1 = {};\n\nfunction scheduleCallback$2(priorityLevel, callback) {\n if (ReactCurrentActQueue$2.current !== null) {\n // Special case: We're inside an `act` scope (a testing utility).\n // Instead of scheduling work in the host environment, add it to a\n // fake internal queue that's managed by the `act` implementation.\n ReactCurrentActQueue$2.current.push(callback);\n return fakeActCallbackNode$1;\n } else {\n return scheduleCallback$3(priorityLevel, callback);\n }\n}\n\nfunction cancelCallback(callbackNode) {\n if (callbackNode === fakeActCallbackNode$1) ; else if (callbackNode !== null) {\n cancelCallback$1(callbackNode);\n }\n}\n\nfunction scheduleImmediateTask(cb) {\n if (ReactCurrentActQueue$2.current !== null) {\n // Special case: Inside an `act` scope, we push microtasks to the fake `act`\n // callback queue. This is because we currently support calling `act`\n // without awaiting the result. The plan is to deprecate that, and require\n // that you always await the result so that the microtasks have a chance to\n // run. But it hasn't happened yet.\n ReactCurrentActQueue$2.current.push(function () {\n cb();\n return null;\n });\n } // TODO: Can we land supportsMicrotasks? Which environments don't support it?\n // Alternatively, can we move this check to the host config?\n\n\n {\n scheduleMicrotask(function () {\n // In Safari, appending an iframe forces microtasks to run.\n // https://github.com/facebook/react/issues/22459\n // We don't support running callbacks in the middle of render\n // or commit so we need to check against that.\n var executionContext = getExecutionContext();\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // Note that this would still prematurely flush the callbacks\n // if this happens outside render or commit phase (e.g. in an event).\n // Intentionally using a macrotask instead of a microtask here. This is\n // wrong semantically but it prevents an infinite loop. The bug is\n // Safari's, not ours, so we just do our best to not crash even though\n // the behavior isn't completely correct.\n scheduleCallback$3(ImmediatePriority, cb);\n return;\n }\n\n cb();\n });\n }\n}\n\nfunction requestTransitionLane() {\n // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the\n // inputs to the algorithm must be the same.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is\n // over. Our heuristic for that is whenever we enter a concurrent work loop.\n if (currentEventTransitionLane === NoLane) {\n // All transitions within the same event are assigned the same lane.\n currentEventTransitionLane = claimNextTransitionLane();\n }\n\n return currentEventTransitionLane;\n}\n\n// transition updates that occur while the async action is still in progress\n// are treated as part of the action.\n//\n// The ideal behavior would be to treat each async function as an independent\n// action. However, without a mechanism like AsyncContext, we can't tell which\n// action an update corresponds to. So instead, we entangle them all into one.\n// The listeners to notify once the entangled scope completes.\n\nvar currentEntangledListeners = null; // The number of pending async actions in the entangled scope.\n\nvar currentEntangledPendingCount = 0; // The transition lane shared by all updates in the entangled scope.\n\nvar currentEntangledLane = NoLane;\nfunction requestAsyncActionContext(actionReturnValue, finishedState) {\n if (actionReturnValue !== null && typeof actionReturnValue === 'object' && typeof actionReturnValue.then === 'function') {\n // This is an async action.\n //\n // Return a thenable that resolves once the action scope (i.e. the async\n // function passed to startTransition) has finished running.\n var thenable = actionReturnValue;\n var entangledListeners;\n\n if (currentEntangledListeners === null) {\n // There's no outer async action scope. Create a new one.\n entangledListeners = currentEntangledListeners = [];\n currentEntangledPendingCount = 0;\n currentEntangledLane = requestTransitionLane();\n } else {\n entangledListeners = currentEntangledListeners;\n }\n\n currentEntangledPendingCount++;\n var resultStatus = 'pending';\n var rejectedReason;\n thenable.then(function () {\n resultStatus = 'fulfilled';\n pingEngtangledActionScope();\n }, function (error) {\n resultStatus = 'rejected';\n rejectedReason = error;\n pingEngtangledActionScope();\n }); // Create a thenable that represents the result of this action, but doesn't\n // resolve until the entire entangled scope has finished.\n //\n // Expressed using promises:\n // const [thisResult] = await Promise.all([thisAction, entangledAction]);\n // return thisResult;\n\n var resultThenable = createResultThenable(entangledListeners); // Attach a listener to fill in the result.\n\n entangledListeners.push(function () {\n switch (resultStatus) {\n case 'fulfilled':\n {\n var fulfilledThenable = resultThenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = finishedState;\n break;\n }\n\n case 'rejected':\n {\n var rejectedThenable = resultThenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = rejectedReason;\n break;\n }\n\n case 'pending':\n default:\n {\n // The listener above should have been called first, so `resultStatus`\n // should already be set to the correct value.\n throw new Error('Thenable should have already resolved. This ' + 'is a bug in React.');\n }\n }\n });\n return resultThenable;\n } else {\n // This is not an async action, but it may be part of an outer async action.\n if (currentEntangledListeners === null) {\n return finishedState;\n } else {\n // Return a thenable that does not resolve until the entangled actions\n // have finished.\n var _entangledListeners = currentEntangledListeners;\n\n var _resultThenable = createResultThenable(_entangledListeners);\n\n _entangledListeners.push(function () {\n var fulfilledThenable = _resultThenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = finishedState;\n });\n\n return _resultThenable;\n }\n }\n}\n\nfunction pingEngtangledActionScope() {\n if (currentEntangledListeners !== null && --currentEntangledPendingCount === 0) {\n // All the actions have finished. Close the entangled async action scope\n // and notify all the listeners.\n var listeners = currentEntangledListeners;\n currentEntangledListeners = null;\n currentEntangledLane = NoLane;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n }\n}\n\nfunction createResultThenable(entangledListeners) {\n // Waits for the entangled async action to complete, then resolves to the\n // result of an individual action.\n var resultThenable = {\n status: 'pending',\n value: null,\n reason: null,\n then: function (resolve) {\n // This is a bit of a cheat. `resolve` expects a value of type `S` to be\n // passed, but because we're instrumenting the `status` field ourselves,\n // and we know this thenable will only be used by React, we also know\n // the value isn't actually needed. So we add the resolve function\n // directly to the entangled listeners.\n //\n // This is also why we don't need to check if the thenable is still\n // pending; the Suspense implementation already performs that check.\n var ping = resolve;\n entangledListeners.push(ping);\n }\n };\n return resultThenable;\n}\n\nfunction peekEntangledActionLane() {\n return currentEntangledLane;\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\nvar didWarnAboutUseWrappedInTryCatch;\nvar didWarnAboutAsyncClientComponent;\n\n{\n didWarnAboutMismatchedHooksForComponent = new Set();\n didWarnAboutUseWrappedInTryCatch = new Set();\n didWarnAboutAsyncClientComponent = new Set();\n} // The effect \"instance\" is a shared object that remains the same for the entire\n// lifetime of an effect. In Rust terms, a RefCell. We use it to store the\n// \"destroy\" function that is returned from an effect, because that is stateful.\n// The field is `undefined` if the effect is unmounted, or if the effect ran\n// but is not stateful. We don't explicitly track whether the effect is mounted\n// or unmounted because that can be inferred by the hiddenness of the fiber in\n// the tree, i.e. whether there is a hidden Offscreen fiber above it.\n//\n// It's unfortunate that this is stored on a separate object, because it adds\n// more memory per effect instance, but it's conceptually sound. I think there's\n// likely a better data structure we could use for effects; perhaps just one\n// array of effect instances per fiber. But I think this is OK for now despite\n// the additional memory and we can follow up with performance\n// optimizations later.\n// These are set right before calling the component.\n\n\nvar renderLanes$1 = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false;\nvar shouldDoubleInvokeUserFnsInHooksDEV = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Counts number of `use`-d thenables\n\nvar thenableIndexCounter = 0;\nvar thenableState = null; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction warnIfAsyncClientComponent(Component, componentDoesIncludeHooks) {\n {\n // This dev-only check only works for detecting native async functions,\n // not transpiled ones. There's also a prod check that we use to prevent\n // async client components from crashing the app; the prod one works even\n // for transpiled async functions. Neither mechanism is completely\n // bulletproof but together they cover the most common cases.\n var isAsyncFunction = // $FlowIgnore[method-unbinding]\n Object.prototype.toString.call(Component) === '[object AsyncFunction]';\n\n if (isAsyncFunction) {\n // Encountered an async Client Component. This is not yet supported,\n // except in certain constrained cases, like during a route navigation.\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n if (!didWarnAboutAsyncClientComponent.has(componentName)) {\n didWarnAboutAsyncClientComponent.add(componentName); // Check if this is a sync update. We use the \"root\" render lanes here\n // because the \"subtree\" render lanes may include additional entangled\n // lanes related to revealing previously hidden content.\n\n var root = getWorkInProgressRoot();\n var rootRenderLanes = getWorkInProgressRootRenderLanes();\n\n if (root !== null && includesBlockingLane(root, rootRenderLanes)) {\n error('async/await is not yet supported in Client Components, only ' + 'Server Components. This error is often caused by accidentally ' + \"adding `'use client'` to a module that was originally written \" + 'for the server.');\n } else {\n // This is a concurrent (Transition, Retry, etc) render. We don't\n // warn in these cases.\n //\n // However, Async Components are forbidden to include hooks, even\n // during a transition, so let's check for that here.\n //\n // TODO: Add a corresponding warning to Server Components runtime.\n if (componentDoesIncludeHooks) {\n error('Hooks are not supported inside an async component. This ' + \"error is often caused by accidentally adding `'use client'` \" + 'to a module that was originally written for the server.');\n }\n }\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes$1 = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\n // thenableIndexCounter = 0;\n // thenableState = null;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n } // In Strict Mode, during development, user functions are double invoked to\n // help detect side effects. The logic for how this is implemented for in\n // hook components is a bit complex so let's break it down.\n //\n // We will invoke the entire component function twice. However, during the\n // second invocation of the component, the hook state from the first\n // invocation will be reused. That means things like `useMemo` functions won't\n // run again, because the deps will match and the memoized result will\n // be reused.\n //\n // We want memoized functions to run twice, too, so account for this, user\n // functions are double invoked during the *first* invocation of the component\n // function, and are *not* double invoked during the second incovation:\n //\n // - First execution of component function: user functions are double invoked\n // - Second execution of component function (in Strict Mode, during\n // development): user functions are not double invoked.\n //\n // This is intentional for a few reasons; most importantly, it's because of\n // how `use` works when something suspends: it reuses the promise that was\n // passed during the first attempt. This is itself a form of memoization.\n // We need to be able to memoize the reactive inputs to the `use` call using\n // a hook (i.e. `useMemo`), which means, the reactive inputs to `use` must\n // come from the same component invocation as the output.\n //\n // There are plenty of tests to ensure this behavior is correct.\n\n\n var shouldDoubleRenderDEV = (workInProgress.mode & StrictLegacyMode) !== NoMode;\n shouldDoubleInvokeUserFnsInHooksDEV = shouldDoubleRenderDEV;\n var children = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = false; // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering until the component stabilizes (there are no more render\n // phase updates).\n children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n }\n\n if (shouldDoubleRenderDEV) {\n // In development, components are invoked twice to help detect side effects.\n setIsStrictModeForDevtools(true);\n\n try {\n children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n finishRenderingHooks(current, workInProgress, Component);\n return children;\n}\n\nfunction finishRenderingHooks(current, workInProgress, Component) {\n {\n workInProgress._debugHookTypes = hookTypesDev;\n var componentDoesIncludeHooks = workInProgressHook !== null || thenableIndexCounter !== 0;\n warnIfAsyncClientComponent(Component, componentDoesIncludeHooks);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes$1 = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n // render. If this fires, it suggests that we incorrectly reset the static\n // flags in some other part of the codebase. This has happened before, for\n // example, in the SuspenseList implementation.\n\n if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n // and creates false positives. To make this work in legacy mode, we'd\n // need to mark fibers that commit in an incomplete state, somehow. For\n // now I'll disable the warning that most of the bugs that would trigger\n // it are either exclusive to concurrent mode or exist in both.\n (current.mode & ConcurrentMode) !== NoMode) {\n error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n }\n }\n\n didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n // localIdCounter = 0;\n\n thenableIndexCounter = 0;\n thenableState = null;\n\n if (didRenderTooFewHooks) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n }\n\n {\n if (checkIfUseWrappedInTryCatch()) {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Unknown';\n\n if (!didWarnAboutUseWrappedInTryCatch.has(componentName) && // This warning also fires if you suspend with `use` inside an\n // async component. Since we warn for that above, we'll silence this\n // second warning by checking here.\n !didWarnAboutAsyncClientComponent.has(componentName)) {\n didWarnAboutUseWrappedInTryCatch.add(componentName);\n\n error('`use` was called from inside a try/catch block. This is not allowed ' + 'and can lead to unexpected behavior. To handle errors triggered ' + 'by `use`, wrap your component in a error boundary.');\n }\n }\n }\n}\n\nfunction replaySuspendedComponentWithHooks(current, workInProgress, Component, props, secondArg) {\n // This function is used to replay a component that previously suspended,\n // after its data resolves.\n //\n // It's a simplified version of renderWithHooks, but it doesn't need to do\n // most of the set up work because they weren't reset when we suspended; they\n // only get reset when the component either completes (finishRenderingHooks)\n // or unwinds (resetHooksOnUnwind).\n {\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n var children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n finishRenderingHooks(current, workInProgress, Component);\n return children;\n}\n\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n // This is used to perform another render pass. It's used when setState is\n // called during render, and for double invoking components in Strict Mode\n // during development.\n //\n // The state from the previous pass is reused whenever possible. So, state\n // updates that were already processed are not processed again, and memoized\n // functions (`useMemo`) are not invoked again.\n //\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n currentlyRenderingFiber$1 = workInProgress;\n var numberOfReRenders = 0;\n var children;\n\n do {\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // It's possible that a use() value depended on a state that was updated in\n // this rerender, so we need to watch for different thenables this time.\n thenableState = null;\n }\n\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n\n return children;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every renderWithHooks call.\n // Conceptually, it's part of the return value of renderWithHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n // complete phase (bubbleProperties).\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive$1 | Update);\n } else {\n workInProgress.flags &= ~(Passive$1 | Update);\n }\n\n current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n // This is called immediaetly after a throw. It shouldn't reset the entire\n // module state, because the work loop might decide to replay the component\n // again without rewinding.\n //\n // It should only reset things like the current dispatcher, to prevent hooks\n // from being called outside of a component.\n currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = workInProgress.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes$1 = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n thenableIndexCounter = 0;\n thenableState = null;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (nextCurrentHook === null) {\n var currentFiber = currentlyRenderingFiber$1.alternate;\n\n if (currentFiber === null) {\n // This is the initial render. This branch is reached when the component\n // suspends, resumes, then renders an additional hook.\n // Should never be reached because we should switch to the mount dispatcher first.\n throw new Error('Update hook called on initial render. This is likely a bug in React. Please file an issue.');\n } else {\n // This is an update. We should always have a current hook.\n throw new Error('Rendered more hooks than during the previous render.');\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n} // NOTE: defining two versions of this function to avoid size impact when this feature is disabled.\n// Previously this function was inlined, the additional `memoCache` property makes it not inlined.\n\n\nvar createFunctionComponentUpdateQueue;\n\n{\n createFunctionComponentUpdateQueue = function () {\n return {\n lastEffect: null,\n events: null,\n stores: null\n };\n };\n}\n\nfunction useThenable(thenable) {\n // Track the position of the thenable within this fiber.\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n\n if (thenableState === null) {\n thenableState = createThenableState();\n }\n\n var result = trackUsedThenable(thenableState, thenable, index);\n\n if (currentlyRenderingFiber$1.alternate === null && (workInProgressHook === null ? currentlyRenderingFiber$1.memoizedState === null : workInProgressHook.next === null)) {\n // Initial render, and either this is the first time the component is\n // called, or there were no Hooks called after this use() the previous\n // time (perhaps because it threw). Subsequent Hook calls should use the\n // mount dispatcher.\n {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n return result;\n}\n\nfunction use(usable) {\n if (usable !== null && typeof usable === 'object') {\n // $FlowFixMe[method-unbinding]\n if (typeof usable.then === 'function') {\n // This is a thenable.\n var thenable = usable;\n return useThenable(thenable);\n } else if (usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE) {\n var context = usable;\n return readContext(context);\n }\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n throw new Error('An unsupported type was passed to use(): ' + String(usable));\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n return updateReducerImpl(hook, currentHook, reducer);\n}\n\nfunction updateReducerImpl(hook, current, reducer) {\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = hook.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = hook.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n // An extra OffscreenLane bit is added to updates that were made to\n // a hidden tree, so that we can distinguish them from updates that were\n // already there when the tree was hidden.\n var updateLane = removeLanes(update.lane, OffscreenLane);\n var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then\n // it's not a \"base\" update and we should disregard the extra base lanes\n // that were added to renderLanes when we entered the Offscreen tree.\n\n var shouldSkipUpdate = isHiddenUpdate ? !isSubsetOfLanes(getWorkInProgressRootRenderLanes(), updateLane) : !isSubsetOfLanes(renderLanes$1, updateLane);\n\n if (shouldSkipUpdate) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n revertLane: update.revertLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n\n {\n // This is not an optimistic update, and we're going to apply it now.\n // But, if there were earlier updates that were skipped, we need to\n // leave this update in the queue so it can be rebased later.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n revertLane: NoLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n }\n } // Process this update.\n\n\n var action = update.action;\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n reducer(newState, action);\n }\n\n if (update.hasEagerState) {\n // If this update is a state update (not a reducer) and was processed eagerly,\n // we can use the eagerly computed state\n newState = update.eagerState;\n } else {\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n if (baseQueue === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.lanes = NoLanes;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = mountWorkInProgressHook();\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n if (nextSnapshot !== getServerSnapshot()) {\n error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n //\n // We won't do this if we're hydrating server-rendered content, because if\n // the content is stale, it's already visible anyway. Instead we'll patch\n // it up in a passive effect.\n\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!includesBlockingLane(root, renderLanes$1)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n } // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n\n hook.memoizedState = nextSnapshot;\n var inst = {\n value: nextSnapshot,\n getSnapshot: getSnapshot\n };\n hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n // this whenever subscribe, getSnapshot, or value changes. Because there's no\n // clean-up function, and we track the deps correctly, we can call pushEffect\n // directly, without storing any additional state. For the same reason, we\n // don't need to set a static flag, either.\n\n fiber.flags |= Passive$1;\n pushEffect(HasEffect | Passive, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), createEffectInstance(), null);\n return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n // Needed for strict mode double render\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n }\n\n var prevSnapshot = (currentHook || hook).memoizedState;\n var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n if (snapshotChanged) {\n hook.memoizedState = nextSnapshot;\n markWorkInProgressReceivedUpdate();\n }\n\n var inst = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the subscribe function changed. We can save some memory by\n // checking whether we scheduled a subscription effect above.\n workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n fiber.flags |= Passive$1;\n pushEffect(HasEffect | Passive, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), createEffectInstance(), null); // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!isHydrating && !includesBlockingLane(root, renderLanes$1)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n }\n\n return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= StoreConsistency;\n var check = {\n getSnapshot: getSnapshot,\n value: renderedSnapshot\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.stores = [check];\n } else {\n var stores = componentUpdateQueue.stores;\n\n if (stores === null) {\n componentUpdateQueue.stores = [check];\n } else {\n stores.push(check);\n }\n }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n // These are updated in the passive phase\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n // have been in an event that fired before the passive effects, or it could\n // have been in a layout effect. In that case, we would have used the old\n // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n var handleStoreChange = function () {\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\n\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n return hook;\n}\n\nfunction mountState(initialState) {\n var hook = mountStateImpl(initialState);\n var queue = hook.queue;\n var dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n queue.dispatch = dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, inst, deps) {\n var effect = {\n tag: tag,\n create: create,\n inst: inst,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction createEffectInstance() {\n return {\n destroy: undefined\n };\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n\n {\n var _ref2 = {\n current: initialValue\n };\n hook.memoizedState = _ref2;\n return _ref2;\n }\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, createEffectInstance(), nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var effect = hook.memoizedState;\n var inst = effect.inst; // currentHook is null on initial mount when rerendering after a render phase\n // state update or for strict mode.\n\n if (currentHook !== null) {\n if (nextDeps !== null) {\n var prevEffect = currentHook.memoizedState;\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n hook.memoizedState = pushEffect(hookFlags, create, inst, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, inst, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode) {\n mountEffectImpl(MountPassiveDev | Passive$1 | PassiveStatic, Passive, create, deps);\n } else {\n mountEffectImpl(Passive$1 | PassiveStatic, Passive, create, deps);\n }\n}\n\nfunction updateEffect(create, deps) {\n updateEffectImpl(Passive$1, Passive, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n var fiberFlags = Update | LayoutStatic;\n\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n var inst = create();\n refCallback(inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst = create();\n\n refObject.current = _inst;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n var fiberFlags = Update | LayoutStatic;\n\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n nextCreate();\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn.\n\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n nextCreate();\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = value;\n return value;\n}\n\nfunction updateDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n var resolvedCurrentHook = currentHook;\n var prevValue = resolvedCurrentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n\n if (currentHook === null) {\n // This is a rerender during a mount.\n hook.memoizedState = value;\n return value;\n } else {\n // This is a rerender during an update.\n var prevValue = currentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value) {\n var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes$1);\n\n if (shouldDeferValue) {\n // This is an urgent update. If the value has changed, keep using the\n // previous value and spawn a deferred render to update it later.\n if (!objectIs(value, prevValue)) {\n // Schedule a deferred render\n var deferredLane = claimNextTransitionLane();\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n // from the latest value. The name \"baseState\" doesn't really match how we\n // use it because we're reusing a state hook field instead of creating a\n // new one.\n\n hook.baseState = true;\n } // Reuse the previous value\n\n\n return prevValue;\n } else {\n // This is not an urgent update, so we can use the latest value regardless\n // of what it is. No need to defer it.\n // However, if we're currently inside a spawned render, then we need to mark\n // this as an update to prevent the fiber from bailing out.\n //\n // `baseState` is true when the current value is different from the rendered\n // value. The name doesn't really match how we use it because we're reusing\n // a state hook field instead of creating a new one.\n if (hook.baseState) {\n // Flip this back to false.\n hook.baseState = false;\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = value;\n return value;\n }\n}\n\nfunction startTransition(fiber, queue, pendingState, finishedState, callback, options) {\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n {\n ReactCurrentBatchConfig$3.transition = null;\n dispatchSetState(fiber, queue, pendingState);\n }\n\n var currentTransition = ReactCurrentBatchConfig$3.transition = {};\n\n {\n ReactCurrentBatchConfig$3.transition._updatedFibers = new Set();\n }\n\n try {\n var returnValue, maybeThenable; if (enableAsyncActions) ; else {\n // Async actions are not enabled.\n dispatchSetState(fiber, queue, finishedState);\n callback();\n }\n } catch (error) {\n {\n // The error rethrowing behavior is only enabled when the async actions\n // feature is on, even for sync actions.\n throw error;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n currentTransition._updatedFibers.clear();\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n }\n }\n }\n}\n\nfunction mountTransition() {\n var stateHook = mountStateImpl(false); // The `start` method never changes.\n\n var start = startTransition.bind(null, currentlyRenderingFiber$1, stateHook.queue, true, false);\n var hook = mountWorkInProgressHook();\n hook.memoizedState = start;\n return [false, start];\n}\n\nfunction updateTransition() {\n var _updateState = updateState(),\n booleanOrThenable = _updateState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n var isPending = typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished.\n useThenable(booleanOrThenable);\n return [isPending, start];\n}\n\nfunction rerenderTransition() {\n var _rerenderState = rerenderState(),\n booleanOrThenable = _rerenderState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n var isPending = typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished.\n useThenable(booleanOrThenable);\n return [isPending, start];\n}\n\nfunction mountId() {\n var hook = mountWorkInProgressHook();\n var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n // should do this in Fiber, too? Deferring this decision for now because\n // there's no other place to store the prefix except for an internal field on\n // the public createRoot object, which the fiber tree does not currently have\n // a reference to.\n\n var identifierPrefix = root.identifierPrefix;\n var id;\n\n if (getIsHydrating()) {\n var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n var localId = localIdCounter++;\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n id += ':';\n } else {\n // Use a lowercase r prefix for client-generated ids.\n var globalClientId = globalClientIdCounter++;\n id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n }\n\n hook.memoizedState = id;\n return id;\n}\n\nfunction updateId() {\n var hook = updateWorkInProgressHook();\n var id = hook.memoizedState;\n return id;\n}\n\nfunction mountRefresh() {\n var hook = mountWorkInProgressHook();\n var refresh = hook.memoizedState = refreshCache.bind(null, currentlyRenderingFiber$1);\n return refresh;\n}\n\nfunction updateRefresh() {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction refreshCache(fiber, seedKey, seedValue) {\n // TODO: Consider warning if the refresh is at discrete priority, or if we\n // otherwise suspect that it wasn't batched properly.\n\n\n var provider = fiber.return;\n\n while (provider !== null) {\n switch (provider.tag) {\n case CacheComponent:\n case HostRoot:\n {\n // Schedule an update on the cache boundary to trigger a refresh.\n var lane = requestUpdateLane(provider);\n var refreshUpdate = createUpdate(lane);\n var root = enqueueUpdate(provider, refreshUpdate, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, provider, lane);\n entangleTransitions(root, provider, lane);\n } // TODO: If a refresh never commits, the new cache created here must be\n // released. A simple case is start refreshing a cache boundary, but then\n // unmount that boundary before the refresh completes.\n\n\n var seededCache = createCache();\n\n if (seedKey !== null && seedKey !== undefined && root !== null) {\n {\n {\n error('The seed argument is not enabled outside experimental channels.');\n }\n }\n }\n\n var payload = {\n cache: seededCache\n };\n refreshUpdate.payload = payload;\n return;\n }\n }\n\n provider = provider.return;\n } // TODO: Warn if unmounted?\n\n}\n\nfunction dispatchReducerAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n revertLane: NoLane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n revertLane: NoLane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var alternate = fiber.alternate;\n\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.hasEagerState = true;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n // TODO: Do we still need to entangle transitions in this case?\n enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update);\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n} // TODO: Move to ReactFiberConcurrentUpdates?\n\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (isTransitionLane(lane)) {\n var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n // must have finished. We can remove them from the shared queue, which\n // represents a superset of the actually pending lanes. In some cases we\n // may entangle more than we need to, but that's OK. In fact it's worse if\n // we *don't* entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError\n};\n\n{\n ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError;\n}\n\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n mountHookTypesDev();\n return mountId();\n }\n };\n\n {\n HooksDispatcherOnMountInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n mountHookTypesDev();\n return mountRefresh();\n };\n }\n\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return mountId();\n }\n };\n\n {\n HooksDispatcherOnMountWithHookTypesInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return mountRefresh();\n };\n }\n\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n HooksDispatcherOnUpdateInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n HooksDispatcherOnRerenderInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnMountInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n mountHookTypesDev();\n return mountRefresh();\n };\n }\n\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnUpdateInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnRerenderInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n}\n\nvar now = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n * 1. render\n * 2. commit (and call `onRender`, `onCommit`)\n * 3. check for nested updates\n * 4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n {\n nestedUpdateScheduled = true;\n }\n}\n\nfunction resetNestedUpdateFlag() {\n {\n currentUpdateIsNested = false;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction syncNestedUpdateFlag() {\n {\n currentUpdateIsNested = nestedUpdateScheduled;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\nfunction recordLayoutEffectDuration(fiber) {\n\n if (layoutEffectStartTime >= 0) {\n var elapsedTime = now() - layoutEffectStartTime;\n layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += elapsedTime;\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += elapsedTime;\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n if (passiveEffectStartTime >= 0) {\n var elapsedTime = now() - passiveEffectStartTime;\n passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n\n if (root !== null) {\n root.passiveEffectDuration += elapsedTime;\n }\n\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n\n if (parentStateNode !== null) {\n // Detached fibers have their state node cleared out.\n // In this case, the return pointer is also cleared out,\n // so we won't be able to report the time spent in this Profiler's subtree.\n parentStateNode.passiveEffectDuration += elapsedTime;\n }\n\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction startLayoutEffectTimer() {\n\n layoutEffectStartTime = now();\n}\n\nfunction startPassiveEffectTimer() {\n\n passiveEffectStartTime = now();\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nvar fakeInternalInstance = {};\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnOnInvalidCallback;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n didWarnOnInvalidCallback = new Set(); // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + \"unstable_renderSubtreeIntoContainer, which isn't supported. Try \" + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction warnOnUndefinedDerivedState(type, partialState) {\n {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n partialState = getDerivedStateFromProps(nextProps, prevState);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: isMounted,\n // $FlowFixMe[missing-local-annot]\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback, 'setState');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback, 'replaceState');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n // $FlowFixMe[missing-local-annot]\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback, 'forceUpdate');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markForceUpdateScheduled(fiber, lane);\n }\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var state = instance.state;\n\n if (state && (typeof state !== 'object' || isArray(state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n }\n\n var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance = new ctor(props, context); // eslint-disable-line no-new\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,\n // both before and after `shouldComponentUpdate` has been called. Not ideal,\n // but I'm loath to refactor this function. This only happens for memoized\n // components so it's not that common.\n enableLazyContextPropagation ;\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nfunction createCapturedValueAtFiber(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source),\n digest: null\n };\n}\nfunction createCapturedValue(value, digest, stack) {\n return {\n value: value,\n source: null,\n stack: stack != null ? stack : null,\n digest: digest != null ? digest : null\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (boundary.tag === ClassComponent) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentName = source ? getComponentNameFromFiber(source) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n\n if (boundary.tag === HostRoot) {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n } else {\n var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n }\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n return getDerivedStateFromError(error$1);\n };\n\n update.callback = function () {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n // $FlowFixMe[missing-this-annot]\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n }\n }\n }\n };\n }\n\n return update;\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n var tag = sourceFiber.tag;\n\n if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n // This marks a Suspense boundary so that when we're unwinding the stack,\n // it captures the suspended \"exception\" and does a second (fallback) pass.\n if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n // Legacy Mode Suspense\n //\n // If the boundary is in legacy mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. When the Suspense boundary completes,\n // we'll do a second pass to render the fallback.\n if (suspenseBoundary === returnFiber) {\n // Special case where we suspended while reconciling the children of\n // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n // when a React.lazy component is a direct child of a\n // Suspense boundary.\n //\n // Suspense boundaries are implemented as multiple fibers, but they\n // are a single conceptual unit. The legacy mode behavior where we\n // pretend the suspended fiber committed as `null` won't work,\n // because in this case the \"suspended\" fiber is the inner\n // Offscreen wrapper.\n //\n // Because the contents of the boundary haven't started rendering\n // yet (i.e. nothing in the tree has partially rendered) we can\n // switch to the regular, concurrent mode behavior: mark the\n // boundary with ShouldCapture and enter the unwind phase.\n suspenseBoundary.flags |= ShouldCapture;\n } else {\n suspenseBoundary.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update, SyncLane);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n }\n\n return suspenseBoundary;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n // the begin phase to prevent an early bailout.\n\n suspenseBoundary.lanes = rootRenderLanes;\n return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete;\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, rootRenderLanes);\n }\n }\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable. The component suspended.\n var wakeable = value;\n resetSuspendedComponent(sourceFiber);\n\n {\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n }\n }\n\n\n var suspenseBoundary = getSuspenseHandler();\n\n if (suspenseBoundary !== null) {\n switch (suspenseBoundary.tag) {\n case SuspenseComponent:\n {\n // If this suspense boundary is not already showing a fallback, mark\n // the in-progress render as suspended. We try to perform this logic\n // as soon as soon as possible during the render phase, so the work\n // loop can know things like whether it's OK to switch to other tasks,\n // or whether it can wait for data to resolve before continuing.\n // TODO: Most of these checks are already performed when entering a\n // Suspense boundary. We should track the information on the stack so\n // we don't have to recompute it on demand. This would also allow us\n // to unify with `use` which needs to perform this logic even sooner,\n // before `throwException` is called.\n if (sourceFiber.mode & ConcurrentMode) {\n if (getShellBoundary() === null) {\n // Suspended in the \"shell\" of the app. This is an undesirable\n // loading state. We should avoid committing this tree.\n renderDidSuspendDelayIfPossible();\n } else {\n // If we suspended deeper than the shell, we don't need to delay\n // the commmit. However, we still call renderDidSuspend if this is\n // a new boundary, to tell the work loop that a new fallback has\n // appeared during this render.\n // TODO: Theoretically we should be able to delete this branch.\n // It's currently used for two things: 1) to throttle the\n // appearance of successive loading states, and 2) in\n // SuspenseList, to determine whether the children include any\n // pending fallbacks. For 1, we should apply throttling to all\n // retries, not just ones that render an additional fallback. For\n // 2, we should check subtreeFlags instead. Then we can delete\n // this branch.\n var current = suspenseBoundary.alternate;\n\n if (current === null) {\n renderDidSuspend();\n }\n }\n }\n\n suspenseBoundary.flags &= ~ForceClientRender;\n markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Retry listener\n //\n // If the fallback does commit, we need to attach a different type of\n // listener. This one schedules an update on the Suspense boundary to\n // turn the fallback state off.\n //\n // Stash the wakeable on the boundary fiber so we can access it in the\n // commit phase.\n //\n // When the wakeable resolves, we'll attempt to render the boundary\n // again (\"retry\").\n // Check if this is a Suspensey resource. We do not attach retry\n // listeners to these, because we don't actually need them for\n // rendering. Only for committing. Instead, if a fallback commits\n // and the only thing that suspended was a Suspensey resource, we\n // retry immediately.\n // TODO: Refactor throwException so that we don't have to do this type\n // check. The caller already knows what the cause was.\n\n var isSuspenseyResource = wakeable === noopSuspenseyCommitThenable;\n\n if (isSuspenseyResource) {\n suspenseBoundary.flags |= ScheduleRetry;\n } else {\n var retryQueue = suspenseBoundary.updateQueue;\n\n if (retryQueue === null) {\n suspenseBoundary.updateQueue = new Set([wakeable]);\n } else {\n retryQueue.add(wakeable);\n }\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n if (suspenseBoundary.mode & ConcurrentMode) {\n suspenseBoundary.flags |= ShouldCapture;\n\n var _isSuspenseyResource = wakeable === noopSuspenseyCommitThenable;\n\n if (_isSuspenseyResource) {\n suspenseBoundary.flags |= ScheduleRetry;\n } else {\n var offscreenQueue = suspenseBoundary.updateQueue;\n\n if (offscreenQueue === null) {\n var newOffscreenQueue = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([wakeable])\n };\n suspenseBoundary.updateQueue = newOffscreenQueue;\n } else {\n var _retryQueue = offscreenQueue.retryQueue;\n\n if (_retryQueue === null) {\n offscreenQueue.retryQueue = new Set([wakeable]);\n } else {\n _retryQueue.add(wakeable);\n }\n }\n }\n\n break;\n } // Fall through\n\n }\n\n default:\n {\n throw new Error(\"Unexpected Suspense handler tag (\" + suspenseBoundary.tag + \"). This \" + 'is a bug in React.');\n }\n } // We only attach ping listeners in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n\n\n if (suspenseBoundary.mode & ConcurrentMode) {\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n\n return;\n } else {\n // No boundary was found. Unless this is a sync update, this is OK.\n // We can suspend and wait for more data to arrive.\n if (root.tag === ConcurrentRoot) {\n // In a concurrent root, suspending without a Suspense boundary is\n // allowed. It will suspend indefinitely without committing.\n //\n // TODO: Should we have different behavior for discrete updates? What\n // about flushSync? Maybe it should put the tree into an inert state,\n // and potentially log a warning. Revisit this for a future release.\n attachPingListener(root, wakeable, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return;\n } else {\n // In a legacy root, suspending without a boundary is always an error.\n var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.');\n value = uncaughtSuspenseError;\n }\n }\n } else {\n // This is a regular error, not a Suspense wakeable.\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n\n var _suspenseBoundary = getSuspenseHandler(); // If the error was thrown during hydration, we may be able to recover by\n // discarding the dehydrated content and switching to a client render.\n // Instead of surfacing the error, find the nearest Suspense boundary\n // and render it again without hydration.\n\n\n if (_suspenseBoundary !== null) {\n if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags$1) {\n // Set a flag to indicate that we should try rendering the normal\n // children again, not the fallback.\n _suspenseBoundary.flags |= ForceClientRender;\n }\n\n markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n // still log it so it can be fixed.\n\n queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n return;\n }\n }\n }\n\n value = createCapturedValueAtFiber(value, sourceFiber);\n renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n enqueueCapturedUpdate(workInProgress, update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags$1 && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n break;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nvar ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows\n// into a dehydrated boundary.\n\nvar SelectiveHydrationException = new Error(\"This is not a real error. It's an implementation detail of React's \" + \"selective hydration feature. If this leaks into userspace, it's a bug in \" + 'React. Please file an issue.');\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\nvar didWarnAboutDefaultPropsOnFunctionComponent;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n didWarnAboutDefaultPropsOnFunctionComponent = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(type));\n }\n\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(_type));\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentNameFromType(outerMemoType));\n }\n }\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n // would during a normal fiber bailout.\n //\n // We don't have strong guarantees that the props object is referentially\n // equal during updates where we can't bail out anyway — like if the props\n // are shallowly equal, but there's a local state or context update in the\n // same batch.\n //\n // However, as a principle, we should aim to make the behavior consistent\n // across different ways of memoizing a component. For example, React.memo\n // has a different internal Fiber layout if you pass a normal function\n // component (SimpleMemoComponent) versus if you pass a different type\n // like forwardRef (MemoComponent). But this is an implementation detail.\n // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n // affect whether the props object is reused during a bailout.\n\n workInProgress.pendingProps = nextProps = prevProps;\n\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumulated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags$1) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var nextIsDetached = (workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;\n var prevState = current !== null ? current.memoizedState : null;\n markRef$1(current, workInProgress);\n\n if (nextProps.mode === 'hidden' || enableLegacyHidden || nextIsDetached) {\n // Rendering a hidden tree.\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend) {\n // Something suspended inside a hidden tree\n // Include the base lanes from the last render\n var nextBaseLanes = prevState !== null ? mergeLanes(prevState.baseLanes, renderLanes) : renderLanes;\n\n if (current !== null) {\n // Reset to the current children\n var currentChild = workInProgress.child = current.child; // The current render suspended, but there may be other lanes with\n // pending work. We can't read `childLanes` from the current Offscreen\n // fiber because we reset it when it was deferred; however, we can read\n // the pending lanes from the child fibers.\n\n var currentChildLanes = NoLanes;\n\n while (currentChild !== null) {\n currentChildLanes = mergeLanes(mergeLanes(currentChildLanes, currentChild.lanes), currentChild.childLanes);\n currentChild = currentChild.sibling;\n }\n\n var lanesWeJustAttempted = nextBaseLanes;\n var remainingChildLanes = removeLanes(currentChildLanes, lanesWeJustAttempted);\n workInProgress.childLanes = remainingChildLanes;\n } else {\n workInProgress.childLanes = NoLanes;\n workInProgress.child = null;\n }\n\n return deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes);\n }\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Consider how Offscreen should work with transitions in the future\n var nextState = {\n baseLanes: NoLanes,\n cachePool: null\n };\n workInProgress.memoizedState = nextState;\n\n {\n // push the cache pool even though we're going to bail out\n // because otherwise there'd be a context mismatch\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n }\n\n reuseHiddenContextOnStack(workInProgress);\n pushOffscreenSuspenseHandler(workInProgress);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n // We're hidden, and we're not rendering at Offscreen. We will bail out\n // and resume this tree later.\n // Schedule this fiber to re-render at Offscreen priority\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane); // Include the base lanes from the last render\n\n var _nextBaseLanes = prevState !== null ? mergeLanes(prevState.baseLanes, renderLanes) : renderLanes;\n\n return deferHiddenOffscreenComponent(current, workInProgress, _nextBaseLanes);\n } else {\n // This is the second render. The surrounding visible content has already\n // committed. Now we resume rendering the hidden tree.\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState = {\n baseLanes: NoLanes,\n cachePool: null\n };\n workInProgress.memoizedState = _nextState;\n\n if (current !== null) {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n var prevCachePool = prevState !== null ? prevState.cachePool : null; // TODO: Consider if and how Offscreen pre-rendering should\n // be attributed to the transition that spawned it\n\n pushTransition(workInProgress, prevCachePool);\n } // Push the lanes that were skipped when we bailed out.\n\n\n if (prevState !== null) {\n pushHiddenContext(workInProgress, prevState);\n } else {\n reuseHiddenContextOnStack(workInProgress);\n }\n\n pushOffscreenSuspenseHandler(workInProgress);\n }\n } else {\n // Rendering a visible tree.\n if (prevState !== null) {\n // We're going from hidden -> visible.\n var _prevCachePool = null;\n\n {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n _prevCachePool = prevState.cachePool;\n }\n\n pushTransition(workInProgress, _prevCachePool); // Push the lanes that were skipped when we bailed out.\n\n pushHiddenContext(workInProgress, prevState);\n reuseSuspenseHandlerOnStack(workInProgress); // Since we're not hidden anymore, reset the state\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n } // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n\n reuseHiddenContextOnStack(workInProgress);\n reuseSuspenseHandlerOnStack(workInProgress);\n }\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes, renderLanes) {\n var nextState = {\n baseLanes: nextBaseLanes,\n // Save the cache pool so we can resume later.\n cachePool: getOffscreenDeferredCache() \n };\n workInProgress.memoizedState = nextState;\n\n {\n // push the cache pool even though we're going to bail out\n // because otherwise there'd be a context mismatch\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n } // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n\n reuseHiddenContextOnStack(workInProgress);\n pushOffscreenSuspenseHandler(workInProgress);\n\n return null;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\nfunction updateCacheComponent(current, workInProgress, renderLanes) {\n\n prepareToReadContext(workInProgress, renderLanes);\n var parentCache = readContext(CacheContext);\n\n if (current === null) {\n // Initial mount. Request a fresh cache from the pool.\n var freshCache = requestCacheFromPool(renderLanes);\n var initialState = {\n parent: parentCache,\n cache: freshCache\n };\n workInProgress.memoizedState = initialState;\n initializeUpdateQueue(workInProgress);\n pushCacheProvider(workInProgress, freshCache);\n } else {\n // Check for updates\n if (includesSomeLane(current.lanes, renderLanes)) {\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, null, null, renderLanes);\n }\n\n var prevState = current.memoizedState;\n var nextState = workInProgress.memoizedState; // Compare the new parent cache to the previous to see detect there was\n // a refresh.\n\n if (prevState.parent !== parentCache) {\n // Refresh in parent. Update the parent.\n var derivedState = {\n parent: parentCache,\n cache: parentCache\n }; // Copied from getDerivedStateFromProps implementation. Once the update\n // queue is empty, persist the derived state onto the base state.\n\n workInProgress.memoizedState = derivedState;\n\n if (workInProgress.lanes === NoLanes) {\n var updateQueue = workInProgress.updateQueue;\n workInProgress.memoizedState = updateQueue.baseState = derivedState;\n }\n\n pushCacheProvider(workInProgress, parentCache); // No need to propagate a context change because the refreshed parent\n // already did.\n } else {\n // The parent didn't refresh. Now check if this cache did.\n var nextCache = nextState.cache;\n pushCacheProvider(workInProgress, nextCache);\n\n if (nextCache !== prevState.cache) {\n // This cache refreshed. Propagate a context change.\n propagateContextChange(workInProgress, CacheContext, renderLanes);\n }\n }\n }\n\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // This should only be called if the name changes\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update;\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markRef$1(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n workInProgress.flags |= RefStatic;\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction replayFunctionComponent(current, workInProgress, nextProps, Component, secondArg, renderLanes) {\n // This function is used to replay a component that previously suspended,\n // after its data resolves. It's a simplified version of\n // updateFunctionComponent that reuses the hooks from the previous attempt.\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var nextChildren = replaySuspendedComponentWithHooks(current, workInProgress, Component, nextProps, secondArg);\n var hasId = checkDidRenderIdHook();\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n // This is used by DevTools to force a boundary to error.\n switch (shouldError(workInProgress)) {\n case false:\n {\n var _instance = workInProgress.stateNode;\n var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n // Is there a better way to do this?\n\n var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n var state = tempInstance.state;\n\n _instance.updater.enqueueSetState(_instance, state, null);\n\n break;\n }\n\n case true:\n {\n workInProgress.flags |= DidCapture;\n workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n var error$1 = new Error('Simulated error coming from DevTools');\n var lane = pickArbitraryLane(renderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n enqueueCapturedUpdate(workInProgress, update);\n break;\n }\n }\n\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef$1(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$2.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance.render();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n\n if (current === null) {\n throw new Error('Should have a current fiber. This is a bug in React.');\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n\n {\n var nextCache = nextState.cache;\n pushCacheProvider(workInProgress, nextCache);\n\n if (nextCache !== prevState.cache) {\n // The root cache refreshed.\n propagateContextChange(workInProgress, CacheContext, renderLanes);\n }\n } // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n\n var nextChildren = nextState.element;\n\n if (prevState.isDehydrated) {\n // This is a hydration root whose shell has not yet hydrated. We should\n // attempt to hydrate.\n // Flip isDehydrated to false to indicate that when this render\n // finishes, the root will no longer be dehydrated.\n var overrideState = {\n element: nextChildren,\n isDehydrated: false,\n cache: nextState.cache\n };\n var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n // have reducer functions so it doesn't need rebasing.\n\n updateQueue.baseState = overrideState;\n workInProgress.memoizedState = overrideState;\n\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during a previous attempt to hydrate the shell, so we\n // forced a client render.\n var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n } else if (nextChildren !== prevChildren) {\n var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n } else {\n // The outermost shell has not hydrated yet. Start hydrating.\n enterHydrationState(workInProgress);\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n }\n } else {\n // Root is not dehydrated. Either this is a client-only root, or it\n // already hydrated.\n resetHydrationState();\n\n if (nextChildren === prevChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n // Revert to client rendering.\n resetHydrationState();\n queueHydrationError(recoverableError);\n workInProgress.flags |= ForceClientRender;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostComponent$1(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n markRef$1(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostHoistable(current, workInProgress, renderLanes) {\n markRef$1(current, workInProgress);\n var currentProps = current === null ? null : current.memoizedProps;\n var resource = workInProgress.memoizedState = getResource(workInProgress.type, currentProps, workInProgress.pendingProps);\n\n if (current === null) {\n if (!getIsHydrating() && resource === null) {\n // This is not a Resource Hoistable and we aren't hydrating so we construct the instance.\n workInProgress.stateNode = createHoistableInstance(workInProgress.type, workInProgress.pendingProps, getRootHostContainer(), workInProgress);\n }\n } // Resources never have reconciler managed children. It is possible for\n // the host implementation of getResource to consider children in the\n // resource construction but they will otherwise be discarded. In practice\n // this precludes all but the simplest children and Host specific warnings\n // should be implemented to warn when children are passsed when otherwise not\n // expected\n\n\n return null;\n}\n\nfunction updateHostSingleton(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n claimHydratableSingleton(workInProgress);\n }\n\n var nextChildren = workInProgress.pendingProps.children;\n\n if (current === null && !getIsHydrating()) {\n // Similar to Portals we append Singleton children in the commit phase. So we\n // Track insertions even on mount.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n markRef$1(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction updateHostText$1(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableTextInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n renderLanes);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n throw new Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". \" + (\"Lazy element type must resolve to a class or function.\" + hint));\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n var hasId;\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$2.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes,\n cachePool: getSuspendedCache()\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n var cachePool = null;\n\n {\n var prevCachePool = prevOffscreenState.cachePool;\n\n if (prevCachePool !== null) {\n var parentCache = CacheContext._currentValue ;\n\n if (prevCachePool.parent !== parentCache) {\n // Detected a refresh in the parent. This overrides any previously\n // suspended cache.\n cachePool = {\n parent: parentCache,\n pool: parentCache\n };\n } else {\n // We can reuse the cache from last time. The only thing that would have\n // overridden it is a parent refresh, which we checked for above.\n cachePool = prevCachePool;\n }\n } else {\n // If there's no previous cache pool, grab the current one.\n cachePool = getSuspendedCache();\n }\n }\n\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n cachePool: cachePool\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n // TODO: For compatibility with offscreen prerendering, this should also check\n // whether the current fiber (if it exists) was visible in the previous tree.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n var suspenseContext = suspenseStackCursor.current;\n return hasSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend || shouldRemainOnFallback(current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconciliation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n\n if (current === null) {\n // Initial mount\n // Special path for hydration\n // If we're currently hydrating, try to hydrate this boundary.\n if (getIsHydrating()) {\n // We must push the suspense handler context *before* attempting to\n // hydrate, to avoid a mismatch in case it errors.\n if (showFallback) {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n } else {\n pushFallbackTreeSuspenseHandler(workInProgress);\n }\n\n tryToClaimNextHydratableSuspenseInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null) {\n var dehydrated = suspenseState.dehydrated;\n\n if (dehydrated !== null) {\n return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n }\n } // If hydration didn't succeed, fall through to the normal Suspense path.\n // To avoid a stack mismatch we need to pop the Suspense handler that we\n // pushed above. This will become less awkward when move the hydration\n // logic to its own fiber.\n\n\n popSuspenseHandler(workInProgress);\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n pushFallbackTreeSuspenseHandler(workInProgress);\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n\n return fallbackFragment;\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n } else {\n // This is an update.\n // Special path for hydration\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var _dehydrated = prevState.dehydrated;\n\n if (_dehydrated !== null) {\n return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);\n }\n }\n\n if (showFallback) {\n pushFallbackTreeSuspenseHandler(workInProgress);\n var _nextFallbackChildren = nextProps.fallback;\n var _nextPrimaryChildren = nextProps.children;\n var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n var _primaryChildFragment2 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment3;\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n // this wrapper function to constrain it.\n return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n var deletions = workInProgress.deletions;\n\n if (deletions === null) {\n workInProgress.deletions = [currentFallbackChildFragment];\n workInProgress.flags |= ChildDeletion;\n } else {\n deletions.push(currentFallbackChildFragment);\n }\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it.\n\n\n workInProgress.deletions = null;\n } else {\n primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n // (We don't do this in legacy mode, because in legacy mode we don't re-use\n // the current tree; see previous branch.)\n\n primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n // Falling back to client rendering. Because this has performance\n // implications, it's considered a recoverable error, even though the user\n // likely won't observe anything wrong with the UI.\n //\n // The error is passed in as an argument to enforce that every caller provide\n // a custom message, or explicitly opt out (currently the only path that opts\n // out is legacy mode; every concurrent path provides an error).\n if (recoverableError !== null) {\n queueHydrationError(recoverableError);\n } // This will add the old fiber to the deletion list\n\n\n reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n var nextProps = workInProgress.pendingProps;\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n primaryChildFragment.flags |= Placement;\n workInProgress.memoizedState = null;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var fiberMode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n // boundary) already mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // We will have dropped the effect list which contains the\n // deletion. We need to reconcile to delete the current child.\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n }\n\n return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n // During the first pass, we'll bail out and not drill into the children.\n // Instead, we'll leave the content in place and try to hydrate it later.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n {\n error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n }\n\n workInProgress.lanes = laneToLanes(SyncLane);\n } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This is a client-only boundary. Since we won't get any content from the server\n // for this, we need to schedule that at a higher priority based on when it would\n // have timed out. In theory we could render it in this pass but it would have the\n // wrong priority associated with it and will prevent hydration of parent path.\n // Instead, we'll leave work left on it to render it in a separate commit.\n // TODO This time should be the time at which the server rendered response that is\n // a parent to this boundary was displayed. However, since we currently don't have\n // a protocol to transfer that time, we'll just estimate it by using the current\n // time. This will mean that Suspense timeouts are slightly shifted to later than\n // they should be.\n // Schedule a normal pri update to render this content.\n workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n } else {\n // We'll continue hydrating the rest at offscreen priority since we'll already\n // be showing the right content coming from the server, it is no rush.\n workInProgress.lanes = laneToLanes(OffscreenLane);\n }\n\n return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {\n if (!didSuspend) {\n // This is the first render pass. Attempt to hydrate.\n pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass,\n // but after we've already committed once.\n\n warnIfHydrating();\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, null);\n }\n\n if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This boundary is in a permanent fallback state. In this case, we'll never\n // get an update and we'll never be able to hydrate the final content. Let's just try the\n // client side render instead.\n var digest, message, stack;\n\n {\n var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n\n digest = _getSuspenseInstanceF.digest;\n message = _getSuspenseInstanceF.message;\n stack = _getSuspenseInstanceF.stack;\n }\n\n var error;\n\n if (message) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(message);\n } else {\n error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n }\n\n error.digest = digest;\n var capturedValue = createCapturedValue(error, digest, stack);\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n }\n // any context has changed, we need to treat is as if the input might have changed.\n\n\n var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n if (didReceiveUpdate || hasContextChanged) {\n // This boundary has changed since the first render. This means that we are now unable to\n // hydrate it. We might still be able to hydrate it using a higher priority lane.\n var root = getWorkInProgressRoot();\n\n if (root !== null) {\n var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n // Intentionally mutating since this render will get interrupted. This\n // is one of the very rare times where we mutate the current tree\n // during the render phase.\n suspenseState.retryLane = attemptHydrationAtLane;\n enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n scheduleUpdateOnFiber(root, current, attemptHydrationAtLane); // Throw a special object that signals to the work loop that it should\n // interrupt the current render.\n //\n // Because we're inside a React-only execution stack, we don't\n // strictly need to throw here — we could instead modify some internal\n // work loop state. But using an exception means we don't need to\n // check for this case on every iteration of the work loop. So doing\n // it this way moves the check out of the fast path.\n\n throw SelectiveHydrationException;\n }\n } // If we did not selectively hydrate, we'll continue rendering without\n // hydrating. Mark this tree as suspended to prevent it from committing\n // outside a transition.\n //\n // This path should only happen if the hydration lane already suspended.\n // Currently, it also happens during sync updates because there is no\n // hydration lane for sync updates.\n // TODO: We should ideally have a sync hydration lane that we can apply to do\n // a pass where we hydrate this subtree in place using the previous Context and then\n // reapply the update afterwards.\n\n\n renderDidSuspendDelayIfPossible();\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, null);\n } else if (isSuspenseInstancePending(suspenseInstance)) {\n // This component is still pending more data from the server, so we can't hydrate its\n // content. We treat it as if this component suspended itself. It might seem as if\n // we could just try to render it client-side instead. However, this will perform a\n // lot of unnecessary work and is unlikely to complete since it often will suspend\n // on missing data anyway. Additionally, the server might be able to render more\n // than we can on the client yet. In that case we'd end up with more fallback states\n // on the client than if we just leave it alone. If the server times out or errors\n // these should update this boundary to the permanent Fallback state instead.\n // Mark it as having captured (i.e. suspended).\n workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n registerSuspenseInstanceRetry(suspenseInstance, retry);\n return null;\n } else {\n // This is the first attempt.\n reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n\n primaryChildFragment.flags |= Hydrating;\n return primaryChildFragment;\n }\n } else {\n // This is the second render pass. We already attempted to hydrated, but\n // something either suspended or errored.\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during hydration. Try again without hydrating.\n pushPrimaryTreeSuspenseHandler(workInProgress);\n workInProgress.flags &= ~ForceClientRender;\n\n var _capturedValue = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n } else if (workInProgress.memoizedState !== null) {\n // Something suspended and we should still be in dehydrated mode.\n // Leave the existing child in place.\n // Push to avoid a mismatch\n pushFallbackTreeSuspenseHandler(workInProgress);\n workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n // but the normal suspense pass doesn't.\n\n workInProgress.flags |= DidCapture;\n return null;\n } else {\n // Suspended but we should no longer be in dehydrated mode.\n // Therefore we now have to render the fallback.\n pushFallbackTreeSuspenseHandler(workInProgress);\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var _primaryChildFragment4 = workInProgress.child;\n _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n }\n }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (node.sibling === null) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isAnArray = isArray(childSlot);\n var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isAnArray || isIterable) {\n var type = isAnArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseListContext(suspenseContext);\n }\n\n pushSuspenseListContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n\n pushProvider(workInProgress, context, newValue);\n\n {\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n\n if (objectIs(oldValue, newValue)) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, renderLanes);\n }\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var newChildren;\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n if (current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n }\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n {\n return null;\n }\n } // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected parent to have a child.');\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected to find the previous sibling.');\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [current];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(current);\n }\n\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n // Before performing an early bailout, we must check if there are pending\n // updates or context.\n var updateLanes = current.lanes;\n\n if (includesSomeLane(updateLanes, renderLanes)) {\n return true;\n } // No pending update, but because context is propagated lazily, we need\n\n return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n\n {\n var cache = current.memoizedState.cache;\n pushCacheProvider(workInProgress, cache);\n }\n\n resetHydrationState();\n break;\n\n case HostSingleton:\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n var context = workInProgress.type._context;\n pushProvider(workInProgress, context, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n }\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n if (state.dehydrated !== null) {\n // We're not going to render the children, so this is just to maintain\n // push/pop symmetry\n pushPrimaryTreeSuspenseHandler(workInProgress); // We know that this component will suspend again because if it has\n // been unsuspended it has committed as a resolved Suspense component.\n // If it needs to be retried, it should have work scheduled on it.\n\n workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n return null;\n } // If this boundary is currently timed out, we need to decide\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushPrimaryTreeSuspenseHandler(workInProgress); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n // Note: We can return `null` here because we already checked\n // whether there were nested context consumers, via the call to\n // `bailoutOnAlreadyFinishedWork` above.\n return null;\n }\n }\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags$1;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseListContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case CacheComponent:\n {\n {\n var _cache = current.memoizedState.cache;\n pushCacheProvider(workInProgress, _cache);\n }\n\n break;\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork$1(current, workInProgress, renderLanes) {\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else {\n // Neither props nor legacy context changes. Check if there's a pending\n // update or context change.\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n // may not be work scheduled on `current`, so we check for this flag.\n (workInProgress.flags & DidCapture) === NoFlags$1) {\n // No pending updates or context. Bail out now.\n didReceiveUpdate = false;\n return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n }\n\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags$1) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n\n if (getIsHydrating() && isForkedChild(workInProgress)) {\n // Check if this child belongs to a list of muliple children in\n // its parent.\n //\n // In a true multi-threaded implementation, we would render children on\n // parallel threads. This would represent the beginning of a new render\n // thread for this subtree.\n //\n // We only use this for id generation during hydration, which is why the\n // logic is located in this special branch.\n var slotIndex = workInProgress.index;\n var numberOfForks = getForksAtLevel();\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, renderLanes);\n }\n\n case FunctionComponent:\n {\n var Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostHoistable:\n {\n return updateHostHoistable(current, workInProgress);\n }\n\n // Fall through\n\n case HostSingleton:\n {\n return updateHostSingleton(current, workInProgress, renderLanes);\n }\n\n // Fall through\n\n case HostComponent:\n return updateHostComponent$1(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText$1(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentNameFromType(_type2));\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case CacheComponent:\n {\n {\n return updateCacheComponent(current, workInProgress, renderLanes);\n }\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nvar valueCursor = createCursor(null);\nvar rendererCursorDEV;\n\n{\n rendererCursorDEV = createCursor(null);\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastFullyObservedContext = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, context, nextValue) {\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n push(rendererCursorDEV, context._currentRenderer, providerFiber);\n\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(context, providerFiber) {\n var currentValue = valueCursor.current;\n\n {\n if (currentValue === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n context._currentValue = context._defaultValue;\n } else {\n context._currentValue = currentValue;\n }\n\n {\n var currentRenderer = rendererCursorDEV.current;\n pop(rendererCursorDEV, providerFiber);\n context._currentRenderer = currentRenderer;\n }\n }\n\n pop(valueCursor, providerFiber);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n } else ;\n\n if (node === propagationRoot) {\n break;\n }\n\n node = node.return;\n }\n\n {\n if (node !== propagationRoot) {\n error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n {\n propagateContextChange_eager(workInProgress, context, renderLanes);\n }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var lane = pickArbitraryLane(renderLanes);\n var update = createUpdate(lane);\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n // Inlined `enqueueUpdate` to remove interleaved update check\n\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) ; else {\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n }\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else if (fiber.tag === DehydratedFragment) {\n // If a dehydrated suspense boundary is in this subtree, we don't know\n // if it will have any context consumers in it. The best we can do is\n // mark it as having updates.\n var parentSuspense = fiber.return;\n\n if (parentSuspense === null) {\n throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n }\n\n parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n var _alternate = parentSuspense.alternate;\n\n if (_alternate !== null) {\n _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n } // This is intentionally passing this fiber as the parent\n // because we want to schedule this fiber as having work\n // on its children. We'll use the childLanes on\n // this fiber to indicate that a context has changed.\n\n\n scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n nextFiber = fiber.sibling;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n }\n}\nfunction readContext(context) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContextForConsumer(currentlyRenderingFiber, context);\n}\nfunction readContextDuringReconcilation(consumer, context, renderLanes) {\n if (currentlyRenderingFiber === null) {\n prepareToReadContext(consumer, renderLanes);\n }\n\n return readContextForConsumer(consumer, context);\n}\n\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue ;\n\n if (lastFullyObservedContext === context) ; else {\n var contextItem = {\n context: context,\n memoizedValue: value,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (consumer === null) {\n throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n consumer.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return value;\n}\n\n// replace it with a lightweight shim that only has the features we use.\n\nvar AbortControllerLocal = typeof AbortController !== 'undefined' ? AbortController : // $FlowFixMe[missing-this-annot]\n// $FlowFixMe[prop-missing]\nfunction AbortControllerShim() {\n var listeners = [];\n var signal = this.signal = {\n aborted: false,\n addEventListener: function (type, listener) {\n listeners.push(listener);\n }\n };\n\n this.abort = function () {\n signal.aborted = true;\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n} ; // Intentionally not named imports because Rollup would\n// use dynamic dispatch for CommonJS interop named imports.\n\nvar scheduleCallback$1 = Scheduler.unstable_scheduleCallback,\n NormalPriority = Scheduler.unstable_NormalPriority;\nvar CacheContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n // We don't use Consumer/Provider for Cache components. So we'll cheat.\n Consumer: null,\n Provider: null,\n // We'll initialize these at the root.\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0,\n _defaultValue: null,\n _globalName: null\n} ;\n\n{\n CacheContext._currentRenderer = null;\n CacheContext._currentRenderer2 = null;\n} // Creates a new empty Cache instance with a ref-count of 0. The caller is responsible\n// for retaining the cache once it is in use (retainCache), and releasing the cache\n// once it is no longer needed (releaseCache).\n\n\nfunction createCache() {\n\n var cache = {\n controller: new AbortControllerLocal(),\n data: new Map(),\n refCount: 0\n };\n return cache;\n}\nfunction retainCache(cache) {\n\n {\n if (cache.controller.signal.aborted) {\n warn('A cache instance was retained after it was already freed. ' + 'This likely indicates a bug in React.');\n }\n }\n\n cache.refCount++;\n} // Cleanup a cache instance, potentially freeing it if there are no more references\n\nfunction releaseCache(cache) {\n\n cache.refCount--;\n\n {\n if (cache.refCount < 0) {\n warn('A cache instance was released after it was already freed. ' + 'This likely indicates a bug in React.');\n }\n }\n\n if (cache.refCount === 0) {\n scheduleCallback$1(NormalPriority, function () {\n cache.controller.abort();\n });\n }\n}\nfunction pushCacheProvider(workInProgress, cache) {\n\n pushProvider(workInProgress, CacheContext, cache);\n}\nfunction popCacheProvider(workInProgress, cache) {\n\n popProvider(CacheContext, workInProgress);\n}\n\nvar ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = null;\nfunction requestCurrentTransition() {\n return ReactCurrentBatchConfig$2.transition;\n} // When retrying a Suspense/Offscreen boundary, we restore the cache that was\n// used during the previous render by placing it here, on the stack.\n\nvar resumedCache = createCursor(null); // During the render/synchronous commit phase, we don't actually process the\n\nfunction peekCacheFromPool() {\n // If we're rendering inside a Suspense boundary that is currently hidden,\n // we should use the same cache that we used during the previous render, if\n // one exists.\n\n\n var cacheResumedFromPreviousRender = resumedCache.current;\n\n if (cacheResumedFromPreviousRender !== null) {\n return cacheResumedFromPreviousRender;\n } // Otherwise, check the root's cache pool.\n\n\n var root = getWorkInProgressRoot();\n var cacheFromRootCachePool = root.pooledCache;\n return cacheFromRootCachePool;\n}\n\nfunction requestCacheFromPool(renderLanes) {\n // Similar to previous function, except if there's not already a cache in the\n // pool, we allocate a new one.\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool !== null) {\n return cacheFromPool;\n } // Create a fresh cache and add it to the root cache pool. A cache can have\n // multiple owners:\n // - A cache pool that lives on the FiberRoot. This is where all fresh caches\n // are originally created (TODO: except during refreshes, until we implement\n // this correctly). The root takes ownership immediately when the cache is\n // created. Conceptually, root.pooledCache is an Option<Arc<Cache>> (owned),\n // and the return value of this function is a &Arc<Cache> (borrowed).\n // - One of several fiber types: host root, cache boundary, suspense\n // component. These retain and release in the commit phase.\n\n\n var root = getWorkInProgressRoot();\n var freshCache = createCache();\n root.pooledCache = freshCache;\n retainCache(freshCache);\n\n if (freshCache !== null) {\n root.pooledCacheLanes |= renderLanes;\n }\n\n return freshCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool, newTransitions) {\n {\n if (prevCachePool === null) {\n push(resumedCache, resumedCache.current, offscreenWorkInProgress);\n } else {\n push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);\n }\n }\n}\nfunction popTransition(workInProgress, current) {\n if (current !== null) {\n\n {\n pop(resumedCache, workInProgress);\n }\n }\n}\nfunction getSuspendedCache() {\n // cache that would have been used to render fresh data during this render,\n // if there was any, so that we can resume rendering with the same cache when\n // we receive more data.\n\n\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool === null) {\n return null;\n }\n\n return {\n // We must also save the parent, so that when we resume we can detect\n // a refresh.\n parent: CacheContext._currentValue ,\n pool: cacheFromPool\n };\n}\nfunction getOffscreenDeferredCache() {\n\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool === null) {\n return null;\n }\n\n return {\n // We must also store the parent, so that when we resume we can detect\n // a refresh.\n parent: CacheContext._currentValue ,\n pool: cacheFromPool\n };\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n}\n\nfunction markRef(workInProgress) {\n workInProgress.flags |= Ref | RefStatic;\n}\n\nfunction appendAllChildren(parent, workInProgress, needsVisibilityToggle, isHidden) {\n {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal || (node.tag === HostSingleton )) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (node.sibling === null) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n} // An unfortunate fork of appendAllChildren because we have two different parent types.\n\nfunction updateHostComponent(current, workInProgress, type, newProps, renderLanes) {\n {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n }\n\n {\n // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n var instance = workInProgress.stateNode; // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n getHostContext();\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n }\n }\n} // This function must be called at the very end of the complete phase, because\n// it might throw to suspend, and if the resource immediately loads, the work\n// loop will resume rendering as if the work-in-progress completed. So it must\n// fully complete.\n// TODO: This should ideally move to begin phase, but currently the instance is\n// not created until the complete phase. For our existing use cases, host nodes\n// that suspend don't have children, so it doesn't matter. But that might not\n// always be true in the future.\n\n\nfunction preloadInstanceAndSuspendIfNeeded(workInProgress, type, props, renderLanes) {\n {\n // If this flag was set previously, we can remove it. The flag\n // represents whether this particular set of props might ever need to\n // suspend. The safest thing to do is for maySuspendCommit to always\n // return true, but if the renderer is reasonably confident that the\n // underlying resource won't be evicted, it can return false as a\n // performance optimization.\n workInProgress.flags &= ~MaySuspendCommit;\n return;\n } // Mark this fiber with a flag. This gets set on all host instances\n}\n\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource, type, props, renderLanes) {\n // This is a fork of preloadInstanceAndSuspendIfNeeded, but for resources.\n if (!mayResourceSuspendCommit(resource)) {\n workInProgress.flags &= ~MaySuspendCommit;\n return;\n }\n\n workInProgress.flags |= MaySuspendCommit;\n var rootRenderLanes = getWorkInProgressRootRenderLanes();\n\n if (!includesOnlyNonUrgentLanes(rootRenderLanes)) ; else {\n var isReady = preloadResource(resource);\n\n if (!isReady) {\n if (shouldRemainOnPreviousScreen()) {\n workInProgress.flags |= ShouldSuspendCommit;\n } else {\n suspendCommit();\n }\n }\n }\n}\n\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n var wakeables = retryQueue;\n\n if (wakeables !== null) {\n // Schedule an effect to attach a retry listener to the promise.\n // TODO: Move to passive phase\n workInProgress.flags |= Update;\n } else {\n // This boundary suspended, but no wakeables were added to the retry\n // queue. Check if the renderer suspended commit. If so, this means\n // that once the fallback is committed, we can immediately retry\n // rendering again, because rendering wasn't actually blocked. Only\n // the commit phase.\n // TODO: Consider a model where we always schedule an immediate retry, even\n // for normal Suspense. That way the retry can partially render up to the\n // first thing that suspends.\n if (workInProgress.flags & ScheduleRetry) {\n var retryLane = // TODO: This check should probably be moved into claimNextRetryLane\n // I also suspect that we need some further consolidation of offscreen\n // and retry lanes.\n workInProgress.tag !== OffscreenComponent ? claimNextRetryLane() : OffscreenLane;\n workInProgress.lanes = mergeLanes(workInProgress.lanes, retryLane);\n }\n }\n}\n\nfunction updateHostText(current, workInProgress, oldText, newText) {\n {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n }\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction bubbleProperties(completedWork) {\n var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n var newChildLanes = NoLanes;\n var subtreeFlags = NoFlags$1;\n\n if (!didBailout) {\n // Bubble up the earliest expiration time.\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n subtreeFlags |= child.subtreeFlags;\n subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n actualDuration += child.actualDuration; // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n subtreeFlags |= _child.subtreeFlags;\n subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child.return = completedWork;\n _child = _child.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n } else {\n // Bubble up the earliest expiration time.\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var _treeBaseDuration = completedWork.selfBaseDuration;\n var _child2 = completedWork.child;\n\n while (_child2 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child2.subtreeFlags & StaticMask;\n subtreeFlags |= _child2.flags & StaticMask; // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n _treeBaseDuration += _child2.treeBaseDuration;\n _child2 = _child2.sibling;\n }\n\n completedWork.treeBaseDuration = _treeBaseDuration;\n } else {\n var _child3 = completedWork.child;\n\n while (_child3 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child3.subtreeFlags & StaticMask;\n subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child3.return = completedWork;\n _child3 = _child3.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n }\n\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\n\nfunction completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags$1) {\n warnIfUnhydratedTailNodes(workInProgress);\n resetHydrationState();\n workInProgress.flags |= ForceClientRender | DidCapture;\n return false;\n }\n\n var wasHydrated = popHydrationState(workInProgress);\n\n if (nextState !== null && nextState.dehydrated !== null) {\n // We might be inside a hydration state the first time we're picking up this\n // Suspense boundary, and also after we've reentered it for further hydration.\n if (current === null) {\n if (!wasHydrated) {\n throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n }\n\n prepareToHydrateHostSuspenseInstance(workInProgress);\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var isTimedOutSuspense = nextState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n } else {\n // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n resetHydrationState();\n\n if ((workInProgress.flags & DidCapture) === NoFlags$1) {\n // This boundary did not suspend so it's now hydrated and unsuspended.\n workInProgress.memoizedState = null;\n } // If nothing suspended, we need to schedule an effect to mark this boundary\n // as having hydrated so events know that they're free to be invoked.\n // It's also a signal to replay events and the suspense callback.\n // If something suspended, schedule an effect to attach retry listeners.\n // So we might as well always mark this.\n\n\n workInProgress.flags |= Update;\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var _isTimedOutSuspense = nextState !== null;\n\n if (_isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var _primaryChildFragment = workInProgress.child;\n\n if (_primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n }\n } else {\n // Successfully completed this tree. If this was a forced client render,\n // there may have been recoverable errors during first hydration\n // attempt. If so, add them to a queue so we can log them in the\n // commit phase.\n upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n return true;\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n bubbleProperties(workInProgress);\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case HostRoot:\n {\n var fiberRoot = workInProgress.stateNode;\n\n {\n var previousCache = null;\n\n if (current !== null) {\n previousCache = current.memoizedState.cache;\n }\n\n var cache = workInProgress.memoizedState.cache;\n\n if (cache !== previousCache) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n\n popCacheProvider(workInProgress);\n }\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else {\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if ( // Check if this is a client root\n !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n (workInProgress.flags & ForceClientRender) !== NoFlags$1) {\n // Schedule an effect to clear this container at the start of the\n // next commit. This handles the case of React rendering into a\n // container with previous children. It's also safe to do for\n // updates too, because current.child would only be null if the\n // previous render was null (so the container would already\n // be empty).\n workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n // recoverable errors during first hydration attempt. If so, add\n // them to a queue so we can log them in the commit phase.\n\n upgradeHydrationErrorsToRecoverable();\n }\n }\n }\n }\n bubbleProperties(workInProgress);\n\n return null;\n }\n\n case HostHoistable:\n {\n {\n // The branching here is more complicated than you might expect because\n // a HostHoistable sometimes corresponds to a Resource and sometimes\n // corresponds to an Instance. It can also switch during an update.\n var type = workInProgress.type;\n var nextResource = workInProgress.memoizedState;\n\n if (current === null) {\n // We are mounting and must Update this Hoistable in this commit\n // @TODO refactor this block to create the instance here in complete\n // phase if we are not hydrating.\n markUpdate(workInProgress);\n\n if (workInProgress.ref !== null) {\n markRef(workInProgress);\n }\n\n if (nextResource !== null) {\n // This is a Hoistable Resource\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource);\n return null;\n } else {\n // This is a Hoistable Instance\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n } else {\n // We are updating.\n var currentResource = current.memoizedState;\n\n if (nextResource !== currentResource) {\n // We are transitioning to, from, or between Hoistable Resources\n // and require an update\n markUpdate(workInProgress);\n }\n\n if (current.ref !== workInProgress.ref) {\n markRef(workInProgress);\n }\n\n if (nextResource !== null) {\n // This is a Hoistable Resource\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n\n if (nextResource === currentResource) {\n workInProgress.flags &= ~MaySuspendCommit;\n } else {\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource);\n }\n\n return null;\n } else {\n // This is a Hoistable Instance\n // We may have props to update on the Hoistable instance.\n {\n // We use the updateHostComponent path becuase it produces\n // the update queue we need for Hoistables.\n updateHostComponent(current, workInProgress, type, newProps);\n } // This must come at the very end of the complete phase.\n\n\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n }\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var _type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n {\n updateHostComponent(current, workInProgress, _type, newProps);\n }\n\n if (current.ref !== workInProgress.ref) {\n markRef(workInProgress);\n }\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n var currentHostContext = getHostContext();\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n var instance;\n\n if (_wasHydrated) {\n // We ignore the boolean indicating there is an updateQueue because\n // it is used only to set text children and HostSingletons do not\n // use them.\n prepareToHydrateHostInstance(workInProgress, currentHostContext);\n instance = workInProgress.stateNode;\n } else {\n instance = resolveSingletonInstance(_type, newProps, rootContainerInstance, currentHostContext, true);\n workInProgress.stateNode = instance;\n markUpdate(workInProgress);\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef(workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var _type2 = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent(current, workInProgress, _type2, newProps);\n\n if (current.ref !== workInProgress.ref) {\n markRef(workInProgress);\n }\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n var _currentHostContext2 = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, _currentHostContext2)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var _rootContainerInstance = getRootHostContainer();\n\n var _instance3 = createInstance(_type2, newProps, _rootContainerInstance, _currentHostContext2, workInProgress);\n\n appendAllChildren(_instance3, workInProgress);\n workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(_instance3, _type2, newProps)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef(workInProgress);\n }\n }\n\n bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might\n // throw to suspend, and if the resource immediately loads, the work loop\n // will resume rendering as if the work-in-progress completed. So it must\n // fully complete.\n\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance2 = getRootHostContainer();\n\n var _currentHostContext3 = getHostContext();\n\n var _wasHydrated3 = popHydrationState(workInProgress);\n\n if (_wasHydrated3) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance2, _currentHostContext3, workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseHandler(workInProgress);\n var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n // to its own fiber type so that we can add other kinds of hydration\n // boundaries that aren't associated with a Suspense tree. In anticipation\n // of such a refactor, all the hydration logic is contained in\n // this branch.\n\n if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n\n if (!fallthroughToNormalSuspensePath) {\n if (workInProgress.flags & ForceClientRender) {\n // Special case. There were remaining unhydrated nodes. We treat\n // this as a mismatch. Revert to client rendering.\n return workInProgress;\n } else {\n // Did not finish hydrating, either because this is the initial\n // render or because something suspended.\n return null;\n }\n } // Continue with the normal Suspense path.\n\n }\n\n if ((workInProgress.flags & DidCapture) !== NoFlags$1) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n } // Don't bubble properties in this case.\n\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = current !== null && current.memoizedState !== null;\n\n if (nextDidTimeout) {\n var offscreenFiber = workInProgress.child;\n var _previousCache = null;\n\n if (offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null && offscreenFiber.alternate.memoizedState.cachePool !== null) {\n _previousCache = offscreenFiber.alternate.memoizedState.cachePool.pool;\n }\n\n var _cache = null;\n\n if (offscreenFiber.memoizedState !== null && offscreenFiber.memoizedState.cachePool !== null) {\n _cache = offscreenFiber.memoizedState.cachePool.pool;\n }\n\n if (_cache !== _previousCache) {\n // Run passive effects to retain/release the cache.\n offscreenFiber.flags |= Passive$1;\n }\n } // If the suspended state of the boundary changes, we need to schedule\n // a passive effect, which is when we process the transitions\n\n\n if (nextDidTimeout !== prevDidTimeout) {\n // an effect to toggle the subtree's visibility. When we switch from\n // fallback -> primary, the inner Offscreen fiber schedules this effect\n // as part of its normal complete phase. But when we switch from\n // primary -> fallback, the inner Offscreen fiber does not have a complete\n // phase. So we need to schedule its effect here.\n //\n // We also use this flag to connect/disconnect the effects, but the same\n // logic applies: when re-connecting, the Offscreen fiber's complete\n // phase will handle scheduling the effect. It's only when the fallback\n // is active that we have to do anything special.\n\n\n if (nextDidTimeout) {\n var _offscreenFiber2 = workInProgress.child;\n _offscreenFiber2.flags |= Visibility;\n }\n }\n\n var retryQueue = workInProgress.updateQueue;\n scheduleRetryEffect(workInProgress, retryQueue);\n\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n if (nextDidTimeout) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n bubbleProperties(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n bubbleProperties(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseListContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n bubbleProperties(workInProgress);\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags$1;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags$1);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thenables. Instead, we'll transfer its thenables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var _retryQueue = suspended.updateQueue;\n workInProgress.updateQueue = _retryQueue;\n scheduleRetryEffect(workInProgress, _retryQueue); // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect flags before doing the second pass since that's now invalid.\n // Reset the child fibers to their original state.\n\n workInProgress.subtreeFlags = NoFlags$1;\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense List Context to force suspense and\n // immediately rerender the children.\n\n pushSuspenseListContext(workInProgress, setShallowSuspenseListContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now$1() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _retryQueue2 = _suspended.updateQueue;\n workInProgress.updateQueue = _retryQueue2;\n scheduleRetryEffect(workInProgress, _retryQueue2);\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We're done.\n bubbleProperties(workInProgress);\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now$1() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.renderingStartTime = now$1();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseListContext(suspenseContext);\n }\n\n pushSuspenseListContext(workInProgress, suspenseContext); // Do a pass over the next row.\n // Don't bubble properties in this case.\n\n return next;\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popSuspenseHandler(workInProgress);\n popHiddenContext(workInProgress);\n var _nextState = workInProgress.memoizedState;\n var nextIsHidden = _nextState !== null; // Schedule a Visibility effect if the visibility has changed\n\n {\n if (current !== null) {\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n\n if (prevIsHidden !== nextIsHidden) {\n workInProgress.flags |= Visibility;\n }\n } else {\n // On initial mount, we only need a Visibility effect if the tree\n // is hidden.\n if (nextIsHidden) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n\n if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n bubbleProperties(workInProgress);\n } else {\n // Don't bubble properties for hidden children unless we're rendering\n // at offscreen priority.\n if (includesSomeLane(renderLanes, OffscreenLane) && // Also don't bubble if the tree suspended\n (workInProgress.flags & DidCapture) === NoLanes) {\n bubbleProperties(workInProgress); // Check if there was an insertion or update in the hidden subtree.\n // If so, we need to hide those nodes in the commit phase, so\n // schedule a visibility effect.\n\n if (workInProgress.subtreeFlags & (Placement | Update)) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n\n var offscreenQueue = workInProgress.updateQueue;\n\n if (offscreenQueue !== null) {\n var _retryQueue3 = offscreenQueue.retryQueue;\n scheduleRetryEffect(workInProgress, _retryQueue3);\n }\n\n {\n var _previousCache2 = null;\n\n if (current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n _previousCache2 = current.memoizedState.cachePool.pool;\n }\n\n var _cache2 = null;\n\n if (workInProgress.memoizedState !== null && workInProgress.memoizedState.cachePool !== null) {\n _cache2 = workInProgress.memoizedState.cachePool.pool;\n }\n\n if (_cache2 !== _previousCache2) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n }\n\n popTransition(workInProgress, current);\n return null;\n }\n\n case CacheComponent:\n {\n {\n var _previousCache3 = null;\n\n if (current !== null) {\n _previousCache3 = current.memoizedState.cache;\n }\n\n var _cache3 = workInProgress.memoizedState.cache;\n\n if (_cache3 !== _previousCache3) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n\n popCacheProvider(workInProgress);\n bubbleProperties(workInProgress);\n }\n\n return null;\n }\n\n case TracingMarkerComponent:\n {\n\n return null;\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n\n {\n popCacheProvider(workInProgress);\n }\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var _flags = workInProgress.flags;\n\n if ((_flags & ShouldCapture) !== NoFlags$1 && (_flags & DidCapture) === NoFlags$1) {\n // There was an error during render that wasn't captured by a suspense\n // boundary. Do a second pass on the root to unmount the children.\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n } // We unwound to the root without completing it. Exit.\n\n\n return null;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseHandler(workInProgress);\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (workInProgress.alternate === null) {\n throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n }\n\n resetHydrationState();\n }\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseListContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popSuspenseHandler(workInProgress);\n popHiddenContext(workInProgress);\n popTransition(workInProgress, current);\n var _flags3 = workInProgress.flags;\n\n if (_flags3 & ShouldCapture) {\n workInProgress.flags = _flags3 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case CacheComponent:\n {\n popCacheProvider(workInProgress);\n }\n\n return null;\n\n case TracingMarkerComponent:\n\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(interruptedWork);\n\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n\n {\n popCacheProvider(interruptedWork);\n }\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n break;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseHandler(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseListContext(interruptedWork);\n break;\n\n case ContextProvider:\n var context = interruptedWork.type._context;\n popProvider(context, interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popSuspenseHandler(interruptedWork);\n popHiddenContext(interruptedWork);\n popTransition(interruptedWork, current);\n break;\n\n case CacheComponent:\n {\n popCacheProvider(interruptedWork);\n }\n\n break;\n }\n}\n\nvar fakeNode = null;\n\n{\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && // $FlowFixMe[method-unbinding]\n typeof document.createEvent === 'function') {\n fakeNode = document.createElement('react');\n }\n}\n\nfunction invokeGuardedCallbackImpl(name, func, context) {\n {\n // In DEV mode, we use a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // fakeNode signifies we are in an environment with a document and window object\n if (fakeNode) {\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n var restoreAfterDispatch = function () {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n }; // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n // $FlowFixMe[method-unbinding]\n\n\n var _funcArgs = Array.prototype.slice.call(arguments, 3);\n\n var callCallback = function () {\n didCall = true;\n restoreAfterDispatch(); // $FlowFixMe[incompatible-call] Flow doesn't understand the arguments splicing.\n\n func.apply(context, _funcArgs);\n didError = false;\n }; // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n var handleWindowError = function (event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n }; // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n\n if (didCall) {\n return;\n } else {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch(); // we fall through and call the prod version instead\n }\n } // We only get here if we are in an environment that either does not support the browser\n // variant or we had trouble getting the browser to emit the error.\n // $FlowFixMe[method-unbinding]\n\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n // $FlowFixMe[incompatible-call] Flow doesn't understand the arguments splicing.\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n }\n}\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\n\nfunction shouldProfile(current) {\n return (current.mode & ProfileMode) !== NoMode && (getExecutionContext() & CommitContext) !== NoContext;\n}\n\nfunction reportUncaughtErrorInDEV(error) {\n // Wrapping each small part of the commit phase into a guarded\n // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n // But we rely on it to surface errors to DEV tools like overlays\n // (https://github.com/facebook/react/issues/21712).\n // As a compromise, rethrow only caught errors in a guard.\n {\n invokeGuardedCallback(null, function () {\n throw error;\n });\n clearCaughtError();\n }\n}\n\nfunction callComponentWillUnmountWithTimer(current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n instance.componentWillUnmount();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n instance.componentWillUnmount();\n }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n try {\n callComponentWillUnmountWithTimer(current, instance);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n commitAttachRef(current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref;\n var refCleanup = current.refCleanup;\n\n if (ref !== null) {\n if (typeof refCleanup === 'function') {\n try {\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n refCleanup();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n refCleanup();\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n // `refCleanup` has been called. Nullify all references to it to prevent double invocation.\n current.refCleanup = null;\n var finishedWork = current.alternate;\n\n if (finishedWork != null) {\n finishedWork.refCleanup = null;\n }\n }\n } else if (typeof ref === 'function') {\n var retVal;\n\n try {\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n retVal = ref(null);\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n retVal = ref(null);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n }\n }\n } else {\n // $FlowFixMe[incompatible-use] unable to narrow type to RefObject\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n prepareForCommit();\n nextEffect = firstChild;\n commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n var shouldFire = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = false;\n return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n var child = fiber.child;\n\n if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags$1 && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitBeforeMutationEffects_complete();\n }\n }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n setCurrentFiber(fiber);\n\n try {\n commitBeforeMutationEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags;\n\n if ((flags & Snapshot) !== NoFlags$1) {\n setCurrentFiber(finishedWork);\n }\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n {\n\n break;\n }\n\n case ForwardRef:\n case SimpleMemoComponent:\n {\n break;\n }\n\n case ClassComponent:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n }\n\n break;\n }\n\n case HostRoot:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n }\n\n break;\n }\n\n case HostComponent:\n case HostHoistable:\n case HostSingleton:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n break;\n\n default:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n }\n }\n }\n\n if ((flags & Snapshot) !== NoFlags$1) {\n resetCurrentFiber();\n }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n // Unmount\n var inst = effect.inst;\n var destroy = inst.destroy;\n\n if (destroy !== undefined) {\n inst.destroy = undefined;\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectUnmountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectUnmountStarted(finishedWork);\n }\n }\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectUnmountStopped();\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(flags, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectMountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectMountStarted(finishedWork);\n }\n } // Mount\n\n\n var create = effect.create;\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n var inst = effect.inst;\n var destroy = create();\n inst.destroy = destroy;\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectMountStopped();\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectMountStopped();\n }\n }\n\n {\n if (destroy !== undefined && typeof destroy !== 'function') {\n var hookName = void 0;\n\n if ((effect.tag & Layout) !== NoFlags$1) {\n hookName = 'useLayoutEffect';\n } else if ((effect.tag & Insertion) !== NoFlags$1) {\n hookName = 'useInsertionEffect';\n } else {\n hookName = 'useEffect';\n }\n\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n if (getExecutionContext() & CommitContext) {\n // Only Profilers with work in their subtree will have an Update effect scheduled.\n if ((finishedWork.flags & Update) !== NoFlags$1) {\n switch (finishedWork.tag) {\n case Profiler:\n {\n var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n var _finishedWork$memoize = finishedWork.memoizedProps,\n id = _finishedWork$memoize.id,\n onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n // It does not get reset until the start of the next commit phase.\n\n var commitTime = getCommitTime();\n var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onPostCommit === 'function') {\n onPostCommit(id, phase, passiveEffectDuration, commitTime);\n } // Bubble times to the next nearest ancestor Profiler.\n // After we process that Profiler, we'll bubble further up.\n\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.passiveEffectDuration += passiveEffectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.passiveEffectDuration += passiveEffectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction commitHookLayoutEffects(finishedWork, hookFlags) {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitClassLayoutLifecycles(finishedWork, current) {\n var instance = finishedWork.stateNode;\n\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n}\n\nfunction commitClassCallbacks(finishedWork) {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n var instance = finishedWork.stateNode;\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitHostComponentMount(finishedWork) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n var instance = finishedWork.stateNode;\n\n try {\n commitMount(instance, type, props, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\n\nfunction commitProfilerUpdate(finishedWork, current) {\n if (getExecutionContext() & CommitContext) {\n try {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n var phase = current === null ? 'mount' : 'update';\n\n if (enableProfilerNestedUpdatePhase) {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onRender === 'function') {\n onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n }\n\n if (enableProfilerCommitHooks) {\n if (typeof onCommit === 'function') {\n onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n // because the effect is also where times bubble to parent Profilers.\n\n\n enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += effectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += effectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n // When updating this function, also update reappearLayoutEffects, which does\n // most of the same things when an offscreen tree goes from hidden -> visible.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitHookLayoutEffects(finishedWork, Layout | HasEffect);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitClassLayoutLifecycles(finishedWork, current);\n }\n\n if (flags & Callback) {\n commitClassCallbacks(finishedWork);\n }\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n }\n\n case HostRoot:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Callback) {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n var instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostSingleton:\n case HostComponent:\n instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n break;\n }\n\n case HostHoistable:\n {\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n } // Fall through\n\n }\n\n case HostSingleton:\n case HostComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && flags & Update) {\n commitHostComponentMount(finishedWork);\n }\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n }\n\n case Profiler:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); // TODO: Should this fire inside an offscreen tree? Or should it wait to\n // fire when the tree becomes visible again.\n\n if (flags & Update) {\n commitProfilerUpdate(finishedWork, current);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var isModernRoot = (finishedWork.mode & ConcurrentMode) !== NoMode;\n\n if (isModernRoot) {\n var isHidden = finishedWork.memoizedState !== null;\n var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n if (newOffscreenSubtreeIsHidden) ; else {\n // The Offscreen tree is visible.\n var wasHidden = current !== null && current.memoizedState !== null;\n var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n // This is the root of a reappearing boundary. As we continue\n // traversing the layout effects, we must also re-mount layout\n // effects that were unmounted when the Offscreen subtree was\n // hidden. So this is a superset of the normal commitLayoutEffects.\n var includeWorkInProgressEffects = (finishedWork.subtreeFlags & LayoutMask) !== NoFlags$1;\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n } else {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n } else {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n\n if (flags & Ref) {\n var props = finishedWork.memoizedProps;\n\n if (props.mode === 'manual') {\n safelyAttachRef(finishedWork, finishedWork.return);\n } else {\n safelyDetachRef(finishedWork, finishedWork.return);\n }\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n // Only hide or unhide the top-most host nodes.\n var hostSubtreeRoot = null;\n\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent || (node.tag === HostHoistable ) || (node.tag === HostSingleton )) {\n if (hostSubtreeRoot === null) {\n hostSubtreeRoot = node;\n\n try {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if (node.tag === HostText) {\n if (hostSubtreeRoot === null) {\n try {\n var _instance = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance);\n } else {\n unhideTextInstance(_instance, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node = node.return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n finishedWork.refCleanup = ref(instanceToUse);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n finishedWork.refCleanup = ref(instanceToUse);\n }\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));\n }\n } // $FlowFixMe[incompatible-use] unable to narrow type to the non-function case\n\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointer to disconnect it from the tree.\n // This enables us to detect and warn against state updates on an unmounted component.\n // It also prevents events from bubbling from within disconnected components.\n //\n // Ideally, we should also clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child.\n // This child itself will be GC:ed when the parent updates the next time.\n //\n // Note that we can't clear child or sibling pointers yet.\n // They're needed for passive effects and for findDOMNode.\n // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n //\n // Don't reset the alternate yet, either. We need that so we can detach the\n // alternate's fields in the passive phase. Clearing the return pointer is\n // sufficient for findDOMNode semantics.\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.return = null;\n }\n\n fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n fiber.alternate = null;\n detachFiberAfterEffects(alternate);\n } // Clear cyclical Fiber fields. This level alone is designed to roughly\n // approximate the planned Fiber refactor. In that world, `setState` will be\n // bound to a special \"instance\" object instead of a Fiber. The Instance\n // object will not have any of these fields. It will only be connected to\n // the fiber tree via a single link at the root. So if this level alone is\n // sufficient to fix memory issues, that bodes well for our plans.\n\n\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n // tree, which has its own pointers to children, parents, and siblings.\n // The other host nodes also point back to fibers, so we should detach that\n // one, too.\n\n if (fiber.tag === HostComponent) {\n var hostInstance = fiber.stateNode;\n\n if (hostInstance !== null) {\n detachDeletedInstance(hostInstance);\n }\n }\n\n fiber.stateNode = null;\n\n {\n fiber._debugOwner = null;\n } // Theoretically, nothing in here should be necessary, because we already\n // disconnected the fiber from the tree. So even if something leaks this\n // particular fiber, it won't leak anything else.\n\n\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n fiber.updateQueue = null;\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || (fiber.tag === HostHoistable ) || (fiber.tag === HostSingleton ) || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n } // $FlowFixMe[incompatible-type] found when upgrading Flow\n\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && (node.tag !== HostSingleton) && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n {\n if (finishedWork.tag === HostSingleton) {\n // Singletons are already in the Host and don't need to be placed\n // Since they operate somewhat like Portals though their children will\n // have Placement and will get placed inside them\n return;\n }\n } // Recursively insert all host nodes into the parent.\n\n\n var parentFiber = getHostParentFiber(finishedWork);\n\n switch (parentFiber.tag) {\n case HostSingleton:\n {\n {\n var parent = parentFiber.stateNode;\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n var _parent = parentFiber.stateNode;\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(_parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var _before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n\n insertOrAppendPlacementNode(finishedWork, _before, _parent);\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n var _parent2 = parentFiber.stateNode.containerInfo;\n\n var _before2 = getHostSibling(finishedWork);\n\n insertOrAppendPlacementNodeIntoContainer(finishedWork, _before2, _parent2);\n break;\n }\n\n default:\n throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal || (tag === HostSingleton )) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal || (tag === HostSingleton )) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n // Recursively delete all host nodes from the parent, detach refs, clean\n // up mounted layout effects, and call componentWillUnmount.\n // We only need to remove the topmost host child in each branch. But then we\n // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n // could split this into two separate traversals functions, where the second\n // one doesn't include any removeChild logic. This is maybe the same\n // function as \"disappearLayoutEffects\" (or whatever that turns into after\n // the layout phase is refactored to use recursion).\n // Before starting, find the nearest host parent on the stack so we know\n // which instance/container to remove the children from.\n // TODO: Instead of searching up the fiber return path on every deletion, we\n // can track the nearest host component on the JS stack as we traverse the\n // tree during the commit phase. This would make insertions faster, too.\n var parent = returnFiber;\n\n findParent: while (parent !== null) {\n switch (parent.tag) {\n case HostSingleton:\n case HostComponent:\n {\n hostParent = parent.stateNode;\n hostParentIsContainer = false;\n break findParent;\n }\n\n case HostRoot:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n\n case HostPortal:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n }\n\n parent = parent.return;\n }\n\n if (hostParent === null) {\n throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n }\n\n commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n hostParent = null;\n hostParentIsContainer = false;\n }\n\n detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n // TODO: Use a static flag to skip trees that don't have unmount effects\n var child = parent.child;\n\n while (child !== null) {\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n child = child.sibling;\n }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n // into their subtree. There are simpler cases in the inner switch\n // that don't modify the stack.\n\n switch (deletedFiber.tag) {\n case HostHoistable:\n {\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n\n if (deletedFiber.memoizedState) {\n releaseResource(deletedFiber.memoizedState);\n } else if (deletedFiber.stateNode) {\n unmountHoistable(deletedFiber.stateNode);\n }\n\n return;\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n }\n\n var prevHostParent = hostParent;\n var prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); // Normally this is called in passive unmount effect phase however with\n // HostSingleton we warn if you acquire one that is already associated to\n // a different fiber. To increase our chances of avoiding this, specifically\n // if you keyed a HostSingleton so there will be a delete followed by a Placement\n // we treat detach eagerly here\n\n releaseSingletonInstance(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n return;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n } // Intentional fallthrough to next branch\n\n }\n\n case HostText:\n {\n // We only need to remove the nearest host child. Set the host parent\n // to `null` on the stack to indicate that nested children don't\n // need to be removed.\n {\n var _prevHostParent = hostParent;\n var _prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent;\n hostParentIsContainer = _prevHostParentIsContainer;\n\n if (hostParent !== null) {\n // Now that all the child effects have unmounted, we can remove the\n // node from the tree.\n if (hostParentIsContainer) {\n removeChildFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n removeChild(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case DehydratedFragment:\n {\n // Delete the dehydrated suspense boundary and all of its content.\n\n\n {\n if (hostParent !== null) {\n if (hostParentIsContainer) {\n clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n // When we go into a portal, it becomes the parent to remove from.\n var _prevHostParent2 = hostParent;\n var _prevHostParentIsContainer2 = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = true;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent2;\n hostParentIsContainer = _prevHostParentIsContainer2;\n }\n\n return;\n }\n\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var tag = effect.tag;\n var inst = effect.inst;\n var destroy = inst.destroy;\n\n if (destroy !== undefined) {\n if ((tag & Insertion) !== NoFlags) {\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n } else if ((tag & Layout) !== NoFlags) {\n {\n markComponentLayoutEffectUnmountStarted(deletedFiber);\n }\n\n if (shouldProfile(deletedFiber)) {\n startLayoutEffectTimer();\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n recordLayoutEffectDuration(deletedFiber);\n } else {\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n }\n\n {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ClassComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var instance = deletedFiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ScopeComponent:\n {\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case OffscreenComponent:\n {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n\n if (deletedFiber.mode & ConcurrentMode) {\n // If this offscreen component is hidden, we already unmounted it. Before\n // deleting the children, track that it's already unmounted so that we\n // don't attempt to unmount the effects again.\n // TODO: If the tree is hidden, in most cases we should be able to skip\n // over the nested children entirely. An exception is we haven't yet found\n // the topmost host node to delete, which we already track on the stack.\n // But the other case is portals, which need to be detached no matter how\n // deeply they are nested. We should use a subtree flag to track whether a\n // subtree includes a nested portal.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n try {\n commitHydratedSuspenseInstance(suspenseInstance);\n\n var hydrationCallbacks, onHydrated; if (enableSuspenseCallback) ;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n}\n\nfunction getRetryCache(finishedWork) {\n // TODO: Unify the interface for the retry cache so we don't have to switch\n // on the tag like this.\n switch (finishedWork.tag) {\n case SuspenseComponent:\n case SuspenseListComponent:\n {\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n return retryCache;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n var _retryCache = instance._retryCache;\n\n if (_retryCache === null) {\n _retryCache = instance._retryCache = new PossiblyWeakSet();\n }\n\n return _retryCache;\n }\n\n default:\n {\n throw new Error(\"Unexpected Suspense handler tag (\" + finishedWork.tag + \"). This is a \" + 'bug in React.');\n }\n }\n}\n\nfunction detachOffscreenInstance(instance) {\n var fiber = instance._current;\n\n if (fiber === null) {\n throw new Error('Calling Offscreen.detach before instance handle has been set.');\n }\n\n if ((instance._pendingVisibility & OffscreenDetached) !== NoFlags$1) {\n // The instance is already detached, this is a noop.\n return;\n } // TODO: There is an opportunity to optimise this by not entering commit phase\n // and unmounting effects directly.\n\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n instance._pendingVisibility |= OffscreenDetached;\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\nfunction attachOffscreenInstance(instance) {\n var fiber = instance._current;\n\n if (fiber === null) {\n throw new Error('Calling Offscreen.detach before instance handle has been set.');\n }\n\n if ((instance._pendingVisibility & OffscreenDetached) === NoFlags$1) {\n // The instance is already attached, this is a noop.\n return;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n instance._pendingVisibility &= ~OffscreenDetached;\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n\n {\n if (isDevToolsPresent) {\n if (inProgressLanes !== null && inProgressRoot !== null) {\n // If we have pending work still, associate the original updaters with it.\n restorePendingUpdaters(inProgressRoot, inProgressLanes);\n } else {\n throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n }\n }\n }\n\n wakeable.then(retry, retry);\n }\n });\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n setCurrentFiber(finishedWork);\n commitMutationEffectsOnFiber(finishedWork, root);\n setCurrentFiber(finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects hae fired.\n var deletions = parentFiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n\n try {\n commitDeletionEffects(root, parentFiber, childToDelete);\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n }\n\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & MutationMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitMutationEffectsOnFiber(child, root);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nvar currentHoistableRoot = null;\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n // because the fiber tag is more specific. An exception is any flag related\n // to reconciliation, because those can be set on all fiber types.\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n try {\n commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n if (flags & Callback && offscreenSubtreeIsHidden) {\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n deferHiddenCallbacks(updateQueue);\n }\n }\n\n return;\n }\n\n case HostHoistable:\n {\n {\n // We cast because we always set the root at the React root and so it cannot be\n // null while we are processing mutation effects\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n if (flags & Update) {\n var currentResource = current !== null ? current.memoizedState : null;\n var newResource = finishedWork.memoizedState;\n\n if (current === null) {\n // We are mounting a new HostHoistable Fiber. We fork the mount\n // behavior based on whether this instance is a Hoistable Instance\n // or a Hoistable Resource\n if (newResource === null) {\n if (finishedWork.stateNode === null) {\n finishedWork.stateNode = hydrateHoistable(hoistableRoot, finishedWork.type, finishedWork.memoizedProps, finishedWork);\n } else {\n mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode);\n }\n } else {\n finishedWork.stateNode = acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps);\n }\n } else if (currentResource !== newResource) {\n // We are moving to or from Hoistable Resource, or between different Hoistable Resources\n if (currentResource === null) {\n if (current.stateNode !== null) {\n unmountHoistable(current.stateNode);\n }\n } else {\n releaseResource(currentResource);\n }\n\n if (newResource === null) {\n mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode);\n } else {\n acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps);\n }\n } else if (newResource === null && finishedWork.stateNode !== null) {\n // We may have an update on a Hoistable element\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null || diffInCommitPhase) {\n try {\n commitUpdate(finishedWork.stateNode, updatePayload, finishedWork.type, current.memoizedProps, finishedWork.memoizedProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n\n return;\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n if (flags & Update) {\n var previousWork = finishedWork.alternate;\n\n if (previousWork === null) {\n var singleton = finishedWork.stateNode;\n var props = finishedWork.memoizedProps; // This was a new mount, we need to clear and set initial properties\n\n clearSingleton(singleton);\n acquireSingletonInstance(finishedWork.type, props, singleton, finishedWork);\n }\n }\n } // Fall through\n\n }\n\n case HostComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n {\n // TODO: ContentReset gets cleared by the children during the commit\n // phase. This is a refactor hazard because it means we must read\n // flags the flags after `commitReconciliationEffects` has already run;\n // the order matters. We should refactor so that ContentReset does not\n // rely on mutating the flag during commit. Like by setting a flag\n // during the render phase instead.\n if (finishedWork.flags & ContentReset) {\n var instance = finishedWork.stateNode;\n\n try {\n resetTextContent(instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n\n if (flags & Update) {\n var _instance2 = finishedWork.stateNode;\n\n if (_instance2 != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var _updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (_updatePayload !== null || diffInCommitPhase) {\n try {\n commitUpdate(_instance2, _updatePayload, type, oldProps, newProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostText:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (finishedWork.stateNode === null) {\n throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n\n try {\n commitTextUpdate(textInstance, oldText, newText);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n {\n prepareToCommitHoistables();\n var previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = previousHoistableRoot;\n commitReconciliationEffects(finishedWork);\n }\n\n if (flags & Update) {\n {\n if (current !== null) {\n var prevRootState = current.memoizedState;\n\n if (prevRootState.isDehydrated) {\n try {\n commitHydratedContainer(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n var _previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(finishedWork.stateNode.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = _previousHoistableRoot;\n }\n\n return;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork); // TODO: We should mark a flag on the Suspense fiber itself, rather than\n // relying on the Offscreen fiber having a flag also being marked. The\n // reason is that this offscreen fiber might not be part of the work-in-\n // progress tree! It could have been reused from a previous render. This\n // doesn't lead to incorrect behavior because we don't rely on the flag\n // check alone; we also compare the states explicitly below. But for\n // modeling purposes, we _should_ be able to rely on the flag check alone.\n // So this is a bit fragile.\n //\n // Also, all this logic could/should move to the passive phase so it\n // doesn't block paint.\n\n var offscreenFiber = finishedWork.child;\n\n if (offscreenFiber.flags & Visibility) {\n // Throttle the appearance and disappearance of Suspense fallbacks.\n var isShowingFallback = finishedWork.memoizedState !== null;\n var wasShowingFallback = current !== null && current.memoizedState !== null;\n\n {\n if (isShowingFallback !== wasShowingFallback) {\n // A fallback is either appearing or disappearing.\n markCommitTimeOfFallback();\n }\n }\n }\n\n if (flags & Update) {\n try {\n commitSuspenseCallback(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n var retryQueue = finishedWork.updateQueue;\n\n if (retryQueue !== null) {\n finishedWork.updateQueue = null;\n attachSuspenseRetryListeners(finishedWork, retryQueue);\n }\n }\n\n return;\n }\n\n case OffscreenComponent:\n {\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n var newState = finishedWork.memoizedState;\n var isHidden = newState !== null;\n var wasHidden = current !== null && current.memoizedState !== null;\n\n if (finishedWork.mode & ConcurrentMode) {\n // Before committing the children, track on the stack whether this\n // offscreen subtree was already hidden, so that we don't unmount the\n // effects again.\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || isHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n } else {\n recursivelyTraverseMutationEffects(root, finishedWork);\n }\n\n commitReconciliationEffects(finishedWork);\n var offscreenInstance = finishedWork.stateNode; // TODO: Add explicit effect flag to set _current.\n\n offscreenInstance._current = finishedWork; // Offscreen stores pending changes to visibility in `_pendingVisibility`. This is\n // to support batching of `attach` and `detach` calls.\n\n offscreenInstance._visibility &= ~OffscreenDetached;\n offscreenInstance._visibility |= offscreenInstance._pendingVisibility & OffscreenDetached;\n\n if (flags & Visibility) {\n // Track the current state on the Offscreen instance so we can\n // read it during an event\n if (isHidden) {\n offscreenInstance._visibility &= ~OffscreenVisible;\n } else {\n offscreenInstance._visibility |= OffscreenVisible;\n }\n\n if (isHidden) {\n var isUpdate = current !== null;\n var wasHiddenByAncestorOffscreen = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden; // Only trigger disapper layout effects if:\n // - This is an update, not first mount.\n // - This Offscreen was not hidden before.\n // - Ancestor Offscreen was not hidden in previous commit.\n\n if (isUpdate && !wasHidden && !wasHiddenByAncestorOffscreen) {\n if ((finishedWork.mode & ConcurrentMode) !== NoMode) {\n // Disappear the layout effects of all the children\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n }\n } // Offscreen with manual mode manages visibility manually.\n\n\n if (!isOffscreenManual(finishedWork)) {\n // TODO: This needs to run whenever there's an insertion or update\n // inside a hidden Offscreen tree.\n hideOrUnhideAllChildren(finishedWork, isHidden);\n }\n } // TODO: Move to passive phase\n\n\n if (flags & Update) {\n var offscreenQueue = finishedWork.updateQueue;\n\n if (offscreenQueue !== null) {\n var _retryQueue = offscreenQueue.retryQueue;\n\n if (_retryQueue !== null) {\n offscreenQueue.retryQueue = null;\n attachSuspenseRetryListeners(finishedWork, _retryQueue);\n }\n }\n }\n\n return;\n }\n\n case SuspenseListComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n var _retryQueue2 = finishedWork.updateQueue;\n\n if (_retryQueue2 !== null) {\n finishedWork.updateQueue = null;\n attachSuspenseRetryListeners(finishedWork, _retryQueue2);\n }\n }\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n\n default:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n // Placement effects (insertions, reorders) can be scheduled on any fiber\n // type. They needs to happen after the children effects have fired, but\n // before the effects on this fiber have fired.\n var flags = finishedWork.flags;\n\n if (flags & Placement) {\n try {\n commitPlacement(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n\n finishedWork.flags &= ~Placement;\n }\n\n if (flags & Hydrating) {\n finishedWork.flags &= ~Hydrating;\n }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n var current = finishedWork.alternate;\n commitLayoutEffectOnFiber(root, current, finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseLayoutEffects(root, parentFiber, lanes) {\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & LayoutMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n var current = child.alternate;\n commitLayoutEffectOnFiber(root, current, child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction disappearLayoutEffects(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n // TODO (Offscreen) Check: flags & LayoutStatic\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout, finishedWork, finishedWork.return);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListUnmount(Layout, finishedWork, finishedWork.return);\n }\n\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case ClassComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(finishedWork, finishedWork.return, instance);\n }\n\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case OffscreenComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n var isHidden = finishedWork.memoizedState !== null;\n\n if (isHidden) ; else {\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n var child = parentFiber.child;\n\n while (child !== null) {\n disappearLayoutEffects(child);\n child = child.sibling;\n }\n}\n\nfunction reappearLayoutEffects(finishedRoot, current, finishedWork, // This function visits both newly finished work and nodes that were re-used\n// from a previously committed tree. We cannot check non-static flags if the\n// node was reused.\nincludeWorkInProgressEffects) {\n // Turn on layout effects in a tree that previously disappeared.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Check flags & LayoutStatic\n\n commitHookLayoutEffects(finishedWork, Layout);\n break;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Check for LayoutStatic flag\n\n var instance = finishedWork.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n } // Commit any callbacks that would have fired while the component\n // was hidden.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n commitHiddenCallbacks(updateQueue, instance);\n } // If this is newly finished work, check for setState callbacks\n\n\n if (includeWorkInProgressEffects && flags & Callback) {\n commitClassCallbacks(finishedWork);\n } // TODO: Check flags & RefStatic\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n // Unlike commitLayoutEffectsOnFiber, we don't need to handle HostRoot\n // because this function only visits nodes that are inside an\n // Offscreen fiber.\n // case HostRoot: {\n // ...\n // }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (includeWorkInProgressEffects && current === null && flags & Update) {\n commitHostComponentMount(finishedWork);\n } // TODO: Check flags & Ref\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n\n case Profiler:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Figure out how Profiler updates should work with Offscreen\n\n if (includeWorkInProgressEffects && flags & Update) {\n commitProfilerUpdate(finishedWork, current);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Figure out how Suspense hydration callbacks should work\n // with Offscreen.\n\n if (includeWorkInProgressEffects && flags & Update) {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var offscreenState = finishedWork.memoizedState;\n var isHidden = offscreenState !== null;\n\n if (isHidden) ; else {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n } // TODO: Check flags & Ref\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n\n default:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {\n // This function visits both newly finished work and nodes that were re-used\n // from a previously committed tree. We cannot check non-static flags if the\n // node was reused.\n var childShouldIncludeWorkInProgressEffects = includeWorkInProgressEffects && (parentFiber.subtreeFlags & LayoutMask) !== NoFlags$1; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n var prevDebugFiber = getCurrentFiber();\n var child = parentFiber.child;\n\n while (child !== null) {\n var current = child.alternate;\n reappearLayoutEffects(finishedRoot, current, child, childShouldIncludeWorkInProgressEffects);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitHookPassiveMountEffects(finishedWork, hookFlags) {\n if (shouldProfile(finishedWork)) {\n startPassiveEffectTimer();\n\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordPassiveEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitOffscreenPassiveMountEffects(current, finishedWork, instance) {\n {\n var previousCache = null;\n\n if (current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n previousCache = current.memoizedState.cachePool.pool;\n }\n\n var nextCache = null;\n\n if (finishedWork.memoizedState !== null && finishedWork.memoizedState.cachePool !== null) {\n nextCache = finishedWork.memoizedState.cachePool.pool;\n } // Retain/release the cache used for pending (suspended) nodes.\n // Note that this is only reached in the non-suspended/visible case:\n // when the content is suspended/hidden, the retain/release occurs\n // via the parent Suspense component (see case above).\n\n\n if (nextCache !== previousCache) {\n if (nextCache != null) {\n retainCache(nextCache);\n }\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n}\n\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n {\n var previousCache = null;\n\n if (finishedWork.alternate !== null) {\n previousCache = finishedWork.alternate.memoizedState.cache;\n }\n\n var nextCache = finishedWork.memoizedState.cache; // Retain/release the cache. In theory the cache component\n // could be \"borrowing\" a cache instance owned by some parent,\n // in which case we could avoid retaining/releasing. But it\n // is non-trivial to determine when that is the case, so we\n // always retain/release.\n\n if (nextCache !== previousCache) {\n retainCache(nextCache);\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n setCurrentFiber(finishedWork);\n commitPassiveMountOnFiber(root, finishedWork, committedLanes, committedTransitions);\n resetCurrentFiber();\n}\n\nfunction recursivelyTraversePassiveMountEffects(root, parentFiber, committedLanes, committedTransitions) {\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitPassiveMountOnFiber(root, child, committedLanes, committedTransitions);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n // When updating this function, also update reconnectPassiveEffects, which does\n // most of the same things when an offscreen tree goes from hidden -> visible,\n // or when toggling effects inside a hidden tree.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);\n }\n\n break;\n }\n\n case HostRoot:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n {\n var previousCache = null;\n\n if (finishedWork.alternate !== null) {\n previousCache = finishedWork.alternate.memoizedState.cache;\n }\n\n var nextCache = finishedWork.memoizedState.cache; // Retain/release the root cache.\n // Note that on initial mount, previousCache and nextCache will be the same\n // and this retain won't occur. To counter this, we instead retain the HostRoot's\n // initial cache when creating the root itself (see createFiberRoot() in\n // ReactFiberRoot.js). Subsequent updates that change the cache are reflected\n // here, such that previous/next caches are retained correctly.\n\n if (nextCache !== previousCache) {\n retainCache(nextCache);\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n }\n\n break;\n }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n // TODO: Pass `current` as argument to this function\n var _instance3 = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden) {\n if (_instance3._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n } else {\n if (finishedWork.mode & ConcurrentMode) {\n // The effects are currently disconnected. Since the tree is hidden,\n // don't connect them. This also applies to the initial render.\n {\n // \"Atomic\" effects are ones that need to fire on every commit,\n // even during pre-rendering. An example is updating the reference\n // count on cache instances.\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n } else {\n // Legacy Mode: Fire the effects even if the tree is hidden.\n _instance3._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n }\n }\n } else {\n // Tree is visible\n if (_instance3._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n } else {\n // The effects are currently disconnected. Reconnect them, while also\n // firing effects inside newly mounted trees. This also applies to\n // the initial render.\n _instance3._visibility |= OffscreenPassiveEffectsConnected;\n var includeWorkInProgressEffects = (finishedWork.subtreeFlags & PassiveMask) !== NoFlags$1;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n }\n\n if (flags & Passive$1) {\n var _current = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(_current, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current2 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current2, finishedWork);\n }\n\n break;\n }\n\n case TracingMarkerComponent:\n\n default:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects) {\n // This function visits both newly finished work and nodes that were re-used\n // from a previously committed tree. We cannot check non-static flags if the\n // node was reused.\n var childShouldIncludeWorkInProgressEffects = includeWorkInProgressEffects && (parentFiber.subtreeFlags & PassiveMask) !== NoFlags$1; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n var prevDebugFiber = getCurrentFiber();\n var child = parentFiber.child;\n\n while (child !== null) {\n reconnectPassiveEffects(finishedRoot, child, committedLanes, committedTransitions, childShouldIncludeWorkInProgressEffects);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, // This function visits both newly finished work and nodes that were re-used\n// from a previously committed tree. We cannot check non-static flags if the\n// node was reused.\nincludeWorkInProgressEffects) {\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects); // TODO: Check for PassiveStatic flag\n\n commitHookPassiveMountEffects(finishedWork, Passive);\n break;\n }\n // Unlike commitPassiveMountOnFiber, we don't need to handle HostRoot\n // because this function only visits nodes that are inside an\n // Offscreen fiber.\n // case HostRoot: {\n // ...\n // }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n var _instance4 = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden) {\n if (_instance4._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n } else {\n if (finishedWork.mode & ConcurrentMode) {\n // The effects are currently disconnected. Since the tree is hidden,\n // don't connect them. This also applies to the initial render.\n {\n // \"Atomic\" effects are ones that need to fire on every commit,\n // even during pre-rendering. An example is updating the reference\n // count on cache instances.\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n } else {\n // Legacy Mode: Fire the effects even if the tree is hidden.\n _instance4._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n }\n } else {\n // Tree is visible\n // Since we're already inside a reconnecting tree, it doesn't matter\n // whether the effects are currently connected. In either case, we'll\n // continue traversing the tree and firing all the effects.\n //\n // We do need to set the \"connected\" flag on the instance, though.\n _instance4._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n\n if (includeWorkInProgressEffects && flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current3 = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(_current3, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n\n if (includeWorkInProgressEffects && flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current4 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current4, finishedWork);\n }\n\n break;\n }\n\n case TracingMarkerComponent:\n\n default:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseAtomicPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions) {\n // \"Atomic\" effects are ones that need to fire on every commit, even during\n // pre-rendering. We call this function when traversing a hidden tree whose\n // regular effects are currently disconnected.\n var prevDebugFiber = getCurrentFiber(); // TODO: Add special flag for atomic effects\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitAtomicPassiveEffects(finishedRoot, child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitAtomicPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n // \"Atomic\" effects are ones that need to fire on every commit, even during\n // pre-rendering. We call this function when traversing a hidden tree whose\n // regular effects are currently disconnected.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case OffscreenComponent:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var current = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(current, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current5 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current5, finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffects(finishedWork) {\n setCurrentFiber(finishedWork);\n commitPassiveUnmountOnFiber(finishedWork);\n resetCurrentFiber();\n} // If we're inside a brand new tree, or a tree that was already visible, then we\n// should only suspend host components that have a ShouldSuspendCommit flag.\n// Components without it haven't changed since the last commit, so we can skip\n// over those.\n//\n// When we enter a tree that is being revealed (going from hidden -> visible),\n// we need to suspend _any_ component that _may_ suspend. Even if they're\n// already in the \"current\" tree. Because their visibility has changed, the\n// browser may not have prerendered them yet. So we check the MaySuspendCommit\n// flag instead.\n\nvar suspenseyCommitFlag = ShouldSuspendCommit;\nfunction accumulateSuspenseyCommit(finishedWork) {\n accumulateSuspenseyCommitOnFiber(finishedWork);\n}\n\nfunction recursivelyAccumulateSuspenseyCommit(parentFiber) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag) {\n var child = parentFiber.child;\n\n while (child !== null) {\n accumulateSuspenseyCommitOnFiber(child);\n child = child.sibling;\n }\n }\n}\n\nfunction accumulateSuspenseyCommitOnFiber(fiber) {\n switch (fiber.tag) {\n case HostHoistable:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n\n if (fiber.flags & suspenseyCommitFlag) {\n if (fiber.memoizedState !== null) {\n suspendResource( // This should always be set by visiting HostRoot first\n currentHoistableRoot, fiber.memoizedState, fiber.memoizedProps);\n }\n }\n\n break;\n }\n\n case HostComponent:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n {\n var previousHoistableRoot = currentHoistableRoot;\n var container = fiber.stateNode.containerInfo;\n currentHoistableRoot = getHoistableRoot(container);\n recursivelyAccumulateSuspenseyCommit(fiber);\n currentHoistableRoot = previousHoistableRoot;\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) ; else {\n var current = fiber.alternate;\n var wasHidden = current !== null && current.memoizedState !== null;\n\n if (wasHidden) {\n // This tree is being revealed. Visit all newly visible suspensey\n // instances, even if they're in the current tree.\n var prevFlags = suspenseyCommitFlag;\n suspenseyCommitFlag = MaySuspendCommit;\n recursivelyAccumulateSuspenseyCommit(fiber);\n suspenseyCommitFlag = prevFlags;\n } else {\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n }\n\n break;\n }\n\n default:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n }\n}\n\nfunction detachAlternateSiblings(parentFiber) {\n // A fiber was deleted from this parent fiber, but it's still part of the\n // previous (alternate) parent fiber's list of children. Because children\n // are a linked list, an earlier sibling that's still alive will be\n // connected to the deleted fiber via its `alternate`:\n //\n // live fiber --alternate--> previous live fiber --sibling--> deleted\n // fiber\n //\n // We can't disconnect `alternate` on nodes that haven't been deleted yet,\n // but we can disconnect the `sibling` and `child` pointers.\n var previousFiber = parentFiber.alternate;\n\n if (previousFiber !== null) {\n var detachedChild = previousFiber.child;\n\n if (detachedChild !== null) {\n previousFiber.child = null;\n\n do {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n detachedChild.sibling = null;\n detachedChild = detachedSibling;\n } while (detachedChild !== null);\n }\n }\n}\n\nfunction commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {\n if (shouldProfile(finishedWork)) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(hookFlags, finishedWork, nearestMountedAncestor);\n recordPassiveEffectDuration(finishedWork);\n } else {\n commitHookEffectListUnmount(hookFlags, finishedWork, nearestMountedAncestor);\n }\n}\n\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects have fired.\n var deletions = parentFiber.deletions;\n\n if ((parentFiber.flags & ChildDeletion) !== NoFlags$1) {\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i]; // TODO: Convert this to use recursion\n\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete, parentFiber);\n }\n }\n\n detachAlternateSiblings(parentFiber);\n }\n\n var prevDebugFiber = getCurrentFiber(); // TODO: Split PassiveMask into separate masks for mount and unmount?\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitPassiveUnmountOnFiber(child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n\n if (finishedWork.flags & Passive$1) {\n commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, Passive | HasEffect);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden && instance._visibility & OffscreenPassiveEffectsConnected && ( // For backwards compatibility, don't unmount when a tree suspends. In\n // the future we may change this to unmount after a delay.\n finishedWork.return === null || finishedWork.return.tag !== SuspenseComponent)) {\n // The effects are currently connected. Disconnect them.\n // TODO: Add option or heuristic to delay before disconnecting the\n // effects. Then if the tree reappears before the delay has elapsed, we\n // can skip toggling the effects entirely.\n instance._visibility &= ~OffscreenPassiveEffectsConnected;\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n } else {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects have fired.\n var deletions = parentFiber.deletions;\n\n if ((parentFiber.flags & ChildDeletion) !== NoFlags$1) {\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i]; // TODO: Convert this to use recursion\n\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete, parentFiber);\n }\n }\n\n detachAlternateSiblings(parentFiber);\n }\n\n var prevDebugFiber = getCurrentFiber(); // TODO: Check PassiveStatic flag\n\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n disconnectPassiveEffect(child);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction disconnectPassiveEffect(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n // TODO: Check PassiveStatic flag\n commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, Passive); // When disconnecting passive effects, we fire the effects in the same\n // order as during a deletiong: parent before child\n\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n break;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance._visibility & OffscreenPassiveEffectsConnected) {\n instance._visibility &= ~OffscreenPassiveEffectsConnected;\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // Deletion effects fire in parent -> child order\n // TODO: Check if fiber has a PassiveStatic flag\n\n setCurrentFiber(fiber);\n commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n resetCurrentFiber();\n var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag.\n\n if (child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var sibling = fiber.sibling;\n var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields.\n // This is more aggressive than ideal, and the long term goal is to only\n // have to detach the deleted tree at the root.\n\n detachFiberAfterEffects(fiber);\n\n if (fiber === deletedSubtreeRoot) {\n nextEffect = null;\n return;\n }\n\n if (sibling !== null) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = returnFiber;\n }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n commitHookPassiveUnmountEffects(current, nearestMountedAncestor, Passive);\n break;\n }\n // TODO: run passive unmount effects when unmounting a root.\n // Because passive unmount effects are not currently run,\n // the cache instance owned by the root will never be freed.\n // When effects are run, the cache should be freed here:\n // case HostRoot: {\n // if (enableCache) {\n // const cache = current.memoizedState.cache;\n // releaseCache(cache);\n // }\n // break;\n // }\n\n case LegacyHiddenComponent:\n case OffscreenComponent:\n {\n {\n if (current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n var cache = current.memoizedState.cachePool.pool; // Retain/release the cache used for pending (suspended) nodes.\n // Note that this is only reached in the non-suspended/visible case:\n // when the content is suspended/hidden, the retain/release occurs\n // via the parent Suspense component (see case above).\n\n if (cache != null) {\n retainCache(cache);\n }\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n\n break;\n }\n\n case CacheComponent:\n {\n {\n var _cache = current.memoizedState.cache;\n releaseCache(_cache);\n }\n\n break;\n }\n }\n}\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Layout | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Passive | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n }\n }\n}\n\nfunction getCacheSignal() {\n\n var cache = readContext(CacheContext);\n return cache.controller.signal;\n}\n\nfunction getCacheForType(resourceType) {\n\n var cache = readContext(CacheContext);\n var cacheForType = cache.data.get(resourceType);\n\n if (cacheForType === undefined) {\n cacheForType = resourceType();\n cache.data.set(resourceType, cacheForType);\n }\n\n return cacheForType;\n}\n\nvar DefaultCacheDispatcher = {\n getCacheSignal: getCacheSignal,\n getCacheForType: getCacheForType\n};\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n symbolFor('selector.component');\n symbolFor('selector.has_pseudo_class');\n symbolFor('selector.role');\n symbolFor('selector.test_id');\n symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n {\n // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n // act environment whenever `jest` is defined, but you can still turn off\n // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n // to false.\n var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? // $FlowFixMe[cannot-resolve-name]\n IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowFixMe[cannot-resolve-name] - Flow doesn't know about jest\n\n var jestIsDefined = typeof jest !== 'undefined';\n return jestIsDefined && isReactActEnvironmentGlobal !== false;\n }\n}\nfunction isConcurrentActEnvironment() {\n {\n var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? // $FlowFixMe[cannot-resolve-name]\n IS_REACT_ACT_ENVIRONMENT : undefined;\n\n if (!isReactActEnvironmentGlobal && ReactCurrentActQueue$1.current !== null) {\n // TODO: Include link to relevant documentation page.\n error('The current testing environment is not configured to support ' + 'act(...)');\n }\n\n return isReactActEnvironmentGlobal;\n }\n}\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,\n ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig,\n ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar RenderContext =\n/* */\n2;\nvar CommitContext =\n/* */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes;\nvar NotSuspended = 0;\nvar SuspendedOnError = 1;\nvar SuspendedOnData = 2;\nvar SuspendedOnImmediate = 3;\nvar SuspendedOnInstance = 4;\nvar SuspendedOnInstanceAndReadyToContinue = 5;\nvar SuspendedOnDeprecatedThrowPromise = 6;\nvar SuspendedAndReadyToContinue = 7;\nvar SuspendedOnHydration = 8; // When this is true, the work-in-progress fiber just suspended (or errored) and\n// we've yet to unwind the stack. In some cases, we may yield to the main thread\n// after this happens. If the fiber is pinged before we resume, we can retry\n// immediately instead of unwinding the stack.\n\nvar workInProgressSuspendedReason = NotSuspended;\nvar workInProgressThrownValue = null; // Whether a ping listener was attached during this render. This is slightly\n// different that whether something suspended, because we don't add multiple\n// listeners to a promise we've already seen (per root and lane).\n\nvar workInProgressRootDidAttachPingListener = false; // A contextual version of workInProgressRootRenderLanes. It is a superset of\n// the lanes that we started working on at the root. When we enter a subtree\n// that is currently hidden, we add the lanes that would have committed if\n// the hidden tree hadn't been deferred. This is modified by the\n// HiddenContext module.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with renderLanes.\n\nvar renderLanes = NoLanes; // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // The most recent time we either committed a fallback, or when a fallback was\n// filled in with the resolved UI. This lets us throttle the appearance of new\n// content as it streams in, to minimize jank.\n// TODO: Think of a better name for this variable?\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 300; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveEffectsRemainingLanes = NoLanes;\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction getWorkInProgressRootRenderLanes() {\n return workInProgressRootRenderLanes;\n}\nfunction isWorkLoopSuspendedOnData() {\n return workInProgressSuspendedReason === SuspendedOnData;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n } else if ((executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n // This is a render phase update. These are not officially supported. The\n // old behavior is to give this the same \"thread\" (lanes) as\n // whatever is currently rendering. So if you call `setState` on a component\n // that happens later in the same render, it will flush. Ideally, we want to\n // remove the special case and treat them as if they came from an\n // interleaved event. Regardless, this pattern is not officially supported.\n // This behavior is only a fallback. The flag only exists until we can roll\n // out the setState warning, since existing code might accidentally rely on\n // the current behavior.\n return pickArbitraryLane(workInProgressRootRenderLanes);\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if (ReactCurrentBatchConfig$1.transition !== null) {\n var transition = ReactCurrentBatchConfig$1.transition;\n\n if (!transition._updatedFibers) {\n transition._updatedFibers = new Set();\n }\n\n transition._updatedFibers.add(fiber);\n }\n\n var actionScopeLane = peekEntangledActionLane();\n return actionScopeLane !== NoLane ? // We're inside an async action scope. Reuse the same lane.\n actionScopeLane : // We may or may not be inside an async action scope. If we are, this\n // is the first update in that scope. Either way, we need to get a\n // fresh transition lane.\n requestTransitionLane();\n } // Updates originating inside certain React methods, like flushSync, have\n // their priority set by tracking it with a context variable.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var updateLane = getCurrentUpdatePriority();\n\n if (updateLane !== NoLane) {\n return updateLane;\n } // This update originated outside React. Ask the host environment for an\n // appropriate priority, based on the type of event.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var eventLane = getCurrentEventPriority();\n return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n }\n\n return claimNextRetryLane();\n}\n\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n {\n if (isRunningInsertionEffect) {\n error('useInsertionEffect must not schedule updates.');\n }\n }\n\n {\n if (isFlushingPassiveEffects) {\n didScheduleUpdateDuringPassiveEffects = true;\n }\n } // Check if the work loop is currently suspended and waiting for data to\n // finish loading.\n\n\n if ( // Suspended render phase\n root === workInProgressRoot && workInProgressSuspendedReason === SuspendedOnData || // Suspended commit phase\n root.cancelPendingCommit !== null) {\n // The incoming update might unblock the current render. Interrupt the\n // current attempt and restart from the top.\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, workInProgressRootRenderLanes);\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane);\n\n if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n // This update was dispatched during the render phase. This is a mistake\n // if the update originates from user space (with the exception of local\n // hook updates, which are handled differently and don't reach this\n // function), but there are some internal React features that use this as\n // an implementation detail, like selective hydration.\n warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n } else {\n // This is a normal update, scheduled from outside the render phase. For\n // example, during an input event.\n {\n if (isDevToolsPresent) {\n addFiberToLanesMap(root, fiber, lane);\n }\n }\n\n warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root.\n if ((executionContext & RenderContext) === NoContext) {\n workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended(root, workInProgressRootRenderLanes);\n }\n }\n\n ensureRootIsScheduled(root);\n\n if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode) {\n if (ReactCurrentActQueue.isBatchingLegacy) ; else {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncWorkOnLegacyRootsOnly();\n }\n }\n }\n}\nfunction scheduleInitialHydrationOnRoot(root, lane) {\n // This is a special fork of scheduleUpdateOnFiber that is only used to\n // schedule the initial hydration of a root that has just been created. Most\n // of the stuff in scheduleUpdateOnFiber can be skipped.\n //\n // The main reason for this separate path, though, is to distinguish the\n // initial children from subsequent updates. In fully client-rendered roots\n // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n // updates, but hydration roots are special because the initial render must\n // match what was rendered on the server.\n var current = root.current;\n current.lanes = lane;\n markRootUpdated(root, lane);\n ensureRootIsScheduled(root);\n}\nfunction isUnsafeClassRenderPhaseUpdate(fiber) {\n // Check if this is a render phase update. Only called by class components,\n // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n return (executionContext & RenderContext) !== NoContext;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n {\n resetNestedUpdateFlag();\n }\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next lanes to work on, using the fields stored\n // on the root.\n // TODO: This was already computed in the caller. Pass it as an argument.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n } // We disable time-slicing in some cases: if the work has been CPU-bound\n // for too long (\"expired\" work, to prevent starvation), or we're in\n // sync-updates-by-default mode.\n // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n // bug we're still investigating. Once the bug in Scheduler is fixed,\n // we can remove this, since we track expiration ourselves.\n\n\n var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && (!didTimeout);\n var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n if (exitStatus !== RootInProgress) {\n if (exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll\n // render synchronously to block concurrent data mutations, and we'll\n // includes all pending updates are included. If it still fails after\n // the second attempt, we'll give up and commit the resulting tree.\n var originallyAttemptedLanes = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, lanes);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n markRootSuspended(root, lanes);\n } else {\n // The render completed.\n // Check if this render may have yielded to a concurrent event, and if so,\n // confirm that any newly rendered stores are consistent.\n // TODO: It's possible that even a concurrent render may never have yielded\n // to the main thread, if it was fast enough, or if it expired. We could\n // skip the consistency check in that case, too.\n var renderWasConcurrent = !includesBlockingLane(root, lanes);\n var finishedWork = root.current.alternate;\n\n if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n // A store was mutated in an interleaved event. Render again,\n // synchronously, to block further mutations.\n exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n if (exitStatus === RootErrored) {\n var _originallyAttemptedLanes = lanes;\n\n var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root, _originallyAttemptedLanes);\n\n if (_errorRetryLanes !== NoLanes) {\n lanes = _errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, _originallyAttemptedLanes, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n // concurrent events.\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var _fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, lanes);\n ensureRootIsScheduled(root);\n throw _fatalError;\n } // FIXME: Need to check for RootDidNotComplete again. The factoring here\n // isn't ideal.\n\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, finishedWork, lanes);\n }\n }\n\n ensureRootIsScheduled(root);\n return getContinuationForRoot(root, originalCallbackNode);\n}\n\nfunction recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes) {\n // If an error occurred during hydration, discard server response and fall\n // back to client side render.\n // Before rendering again, save the errors from the previous attempt.\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n var wasRootDehydrated = isRootDehydrated(root);\n\n if (wasRootDehydrated) {\n // The shell failed to hydrate. Set a flag to force a client rendering\n // during the next attempt. To do this, we call prepareFreshStack now\n // to create the root work-in-progress fiber. This is a bit weird in terms\n // of factoring, because it relies on renderRootSync not calling\n // prepareFreshStack again in the call below, which happens because the\n // root and lanes haven't changed.\n //\n // TODO: I think what we should do is set ForceClientRender inside\n // throwException, like we do for nested Suspense boundaries. The reason\n // it's here instead is so we can switch to the synchronous work loop, too.\n // Something to consider for a future refactor.\n var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n rootWorkInProgress.flags |= ForceClientRender;\n\n {\n errorHydratingContainer(root.containerInfo);\n }\n }\n\n var exitStatus = renderRootSync(root, errorRetryLanes);\n\n if (exitStatus !== RootErrored) {\n // Successfully finished rendering on retry\n if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {\n // During the synchronous render, we attached additional ping listeners.\n // This is highly suggestive of an uncached promise (though it's not the\n // only reason this would happen). If it was an uncached promise, then\n // it may have masked a downstream error from ocurring without actually\n // fixing it. Example:\n //\n // use(Promise.resolve('uncached'))\n // throw new Error('Oops!')\n //\n // When this happens, there's a conflict between blocking potential\n // concurrent data races and unwrapping uncached promise values. We\n // have to choose one or the other. Because the data race recovery is\n // a last ditch effort, we'll disable it.\n root.errorRecoveryDisabledLanes = mergeLanes(root.errorRecoveryDisabledLanes, originallyAttemptedLanes); // Mark the current render as suspended and force it to restart. Once\n // these lanes finish successfully, we'll re-enable the error recovery\n // mechanism for subsequent updates.\n\n workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes;\n return RootSuspendedWithDelay;\n } // The errors from the failed first attempt have been recovered. Add\n // them to the collection of recoverable errors. We'll log them in the\n // commit phase.\n\n\n var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n // from the first attempt, to preserve the causal sequence.\n\n if (errorsFromSecondAttempt !== null) {\n queueRecoverableErrors(errorsFromSecondAttempt);\n }\n }\n\n return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n if (workInProgressRootRecoverableErrors === null) {\n workInProgressRootRecoverableErrors = errors;\n } else {\n // $FlowFixMe[method-unbinding]\n workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n }\n}\n\nfunction finishConcurrentRender(root, exitStatus, finishedWork, lanes) {\n // TODO: The fact that most of these branches are identical suggests that some\n // of the exit statuses are not best modeled as exit statuses and should be\n // tracked orthogonally.\n switch (exitStatus) {\n case RootInProgress:\n case RootFatalErrored:\n {\n throw new Error('Root did not complete. This is a bug in React.');\n }\n\n case RootSuspendedWithDelay:\n {\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n markRootSuspended(root, lanes);\n return;\n } // Commit the placeholder.\n\n\n break;\n }\n\n case RootErrored:\n case RootSuspended:\n case RootCompleted:\n {\n break;\n }\n\n default:\n {\n throw new Error('Unknown root exit status.');\n }\n }\n\n if (shouldForceFlushFallbacksInDEV()) {\n // We're inside an `act` scope. Commit immediately.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n } else {\n if (includesOnlyRetries(lanes) && (alwaysThrottleRetries )) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n markRootSuspended(root, lanes);\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work we can do on this root. We might as well\n // attempt to work on that while we're suspended.\n return;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n // TODO: Combine retry throttling with Suspensey commits. Right now they\n // run one after the other.\n\n\n root.timeoutHandle = scheduleTimeout(commitRootWhenReady.bind(null, root, finishedWork, workInProgressRootRecoverableErrors, workInProgressTransitions, lanes), msUntilTimeout);\n return;\n }\n }\n\n commitRootWhenReady(root, finishedWork, workInProgressRootRecoverableErrors, workInProgressTransitions, lanes);\n }\n}\n\nfunction commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, lanes) {\n // TODO: Combine retry throttling with Suspensey commits. Right now they run\n // one after the other.\n if (includesOnlyNonUrgentLanes(lanes)) {\n // Before committing, ask the renderer whether the host tree is ready.\n // If it's not, we'll wait until it notifies us.\n startSuspendingCommit(); // This will walk the completed fiber tree and attach listeners to all\n // the suspensey resources. The renderer is responsible for accumulating\n // all the load events. This all happens in a single synchronous\n // transaction, so it track state in its own module scope.\n\n accumulateSuspenseyCommit(finishedWork); // At the end, ask the renderer if it's ready to commit, or if we should\n // suspend. If it's not ready, it will return a callback to subscribe to\n // a ready event.\n\n var schedulePendingCommit = waitForCommitToBeReady();\n\n if (schedulePendingCommit !== null) {\n // NOTE: waitForCommitToBeReady returns a subscribe function so that we\n // only allocate a function if the commit isn't ready yet. The other\n // pattern would be to always pass a callback to waitForCommitToBeReady.\n // Not yet ready to commit. Delay the commit until the renderer notifies\n // us that it's ready. This will be canceled if we start work on the\n // root again.\n root.cancelPendingCommit = schedulePendingCommit(commitRoot.bind(null, root, recoverableErrors, transitions));\n markRootSuspended(root, lanes);\n return;\n }\n } // Otherwise, commit immediately.\n\n\n commitRoot(root, recoverableErrors, transitions);\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n // Search the rendered tree for external store reads, and check whether the\n // stores were mutated in a concurrent event. Intentionally using an iterative\n // loop instead of recursion so we can exit early.\n var node = finishedWork;\n\n while (true) {\n if (node.flags & StoreConsistency) {\n var updateQueue = node.updateQueue;\n\n if (updateQueue !== null) {\n var checks = updateQueue.stores;\n\n if (checks !== null) {\n for (var i = 0; i < checks.length; i++) {\n var check = checks[i];\n var getSnapshot = check.getSnapshot;\n var renderedValue = check.value;\n\n try {\n if (!objectIs(getSnapshot(), renderedValue)) {\n // Found an inconsistent store.\n return false;\n }\n } catch (error) {\n // If `getSnapshot` throws, return `false`. This will schedule\n // a re-render, and the error will be rethrown during render.\n return false;\n }\n }\n }\n }\n }\n\n var child = node.child;\n\n if (node.subtreeFlags & StoreConsistency && child !== null) {\n child.return = node;\n node = child;\n continue;\n }\n\n if (node === finishedWork) {\n return true;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return true;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow doesn't know this is unreachable, but eslint does\n // eslint-disable-next-line no-unreachable\n\n\n return true;\n}\n\nfunction markRootSuspended(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n markRootSuspended$1(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n {\n syncNestedUpdateFlag();\n }\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n flushPassiveEffects(); // TODO: This was already computed in the caller. Pass it as an argument.\n\n var lanes = getNextLanes(root, NoLanes);\n\n if (!includesSyncLane(lanes)) {\n // There's no remaining sync work left.\n ensureRootIsScheduled(root);\n return null;\n }\n\n var exitStatus = renderRootSync(root, lanes);\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n var originallyAttemptedLanes = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, lanes);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n markRootSuspended(root, lanes);\n ensureRootIsScheduled(root);\n return null;\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root);\n return null;\n}\nfunction flushRoot(root, lanes) {\n if (lanes !== NoLanes) {\n markRootEntangled(root, mergeLanes(lanes, SyncLane));\n ensureRootIsScheduled(root);\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n resetRenderTimer(); // TODO: For historical reasons this flushes all sync work across all\n // roots. It shouldn't really matter either way, but we could change this\n // to only flush the given root.\n\n flushSyncWorkOnAllRoots();\n }\n }\n}\nfunction getExecutionContext() {\n return executionContext;\n}\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n // most batchedUpdates-like method.\n\n if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !(ReactCurrentActQueue.isBatchingLegacy)) {\n resetRenderTimer();\n flushSyncWorkOnLegacyRootsOnly();\n }\n }\n}\n// Warning, this opts-out of checking the function body.\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\n// eslint-disable-next-line no-redeclare\n\nfunction flushSync$1(fn) {\n // In legacy mode, we flush pending passive effects at the beginning of the\n // next event, not at the end of the previous one.\n if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushPassiveEffects();\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n\n if (fn) {\n return fn();\n } else {\n return undefined;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition;\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushSyncWorkOnAllRoots();\n }\n }\n}\nfunction isAlreadyRendering() {\n // Used by the renderer to print a warning if certain APIs are called from\n // the wrong context.\n return (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\n// hidden subtree. The stack logic is managed there because that's the only\n// place that ever modifies it. Which module it lives in doesn't matter for\n// performance because this function will get inlined regardless\n\nfunction setRenderLanes(subtreeRenderLanes) {\n renderLanes = subtreeRenderLanes;\n}\nfunction getRenderLanes() {\n return renderLanes;\n}\n\nfunction resetWorkInProgressStack() {\n if (workInProgress === null) return;\n var interruptedWork;\n\n if (workInProgressSuspendedReason === NotSuspended) {\n // Normal case. Work-in-progress hasn't started yet. Unwind all\n // its parents.\n interruptedWork = workInProgress.return;\n } else {\n // Work-in-progress is in suspended state. Reset the work loop and unwind\n // both the suspended fiber and all its parents.\n resetSuspendedWorkLoopOnUnwind(workInProgress);\n interruptedWork = workInProgress;\n }\n\n while (interruptedWork !== null) {\n var current = interruptedWork.alternate;\n unwindInterruptedWork(current, interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n\n workInProgress = null;\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe[incompatible-call] Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n var cancelPendingCommit = root.cancelPendingCommit;\n\n if (cancelPendingCommit !== null) {\n root.cancelPendingCommit = null;\n cancelPendingCommit();\n }\n\n resetWorkInProgressStack();\n workInProgressRoot = root;\n var rootWorkInProgress = createWorkInProgress(root.current, null);\n workInProgress = rootWorkInProgress;\n workInProgressRootRenderLanes = renderLanes = lanes;\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n workInProgressRootDidAttachPingListener = false;\n workInProgressRootExitStatus = RootInProgress;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootInterleavedUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n workInProgressRootConcurrentErrors = null;\n workInProgressRootRecoverableErrors = null;\n finishQueueingConcurrentUpdates();\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n\n return rootWorkInProgress;\n}\n\nfunction resetSuspendedWorkLoopOnUnwind(fiber) {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksOnUnwind(fiber);\n resetChildReconcilerOnUnwind();\n}\n\nfunction handleThrow(root, thrownValue) {\n // A component threw an exception. Usually this is because it suspended, but\n // it also includes regular program errors.\n //\n // We're either going to unwind the stack to show a Suspense or error\n // boundary, or we're going to replay the component again. Like after a\n // promise resolves.\n //\n // Until we decide whether we're going to unwind or replay, we should preserve\n // the current state of the work loop without resetting anything.\n //\n // If we do decide to unwind the stack, module-level variables will be reset\n // in resetSuspendedWorkLoopOnUnwind.\n // These should be reset immediately because they're only supposed to be set\n // when React is executing user code.\n resetHooksAfterThrow();\n resetCurrentFiber();\n ReactCurrentOwner$1.current = null;\n\n if (thrownValue === SuspenseException) {\n // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown value\n // to be a thenable, because before `use` existed that was the (unstable)\n // API for suspending. This implementation detail can change later, once we\n // deprecate the old API in favor of `use`.\n thrownValue = getSuspendedThenable();\n workInProgressSuspendedReason = shouldRemainOnPreviousScreen() && // Check if there are other pending updates that might possibly unblock this\n // component from suspending. This mirrors the check in\n // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow.\n // TODO: Consider unwinding immediately, using the\n // SuspendedOnHydration mechanism.\n !includesNonIdleWork(workInProgressRootSkippedLanes) && !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) ? // Suspend work loop until data resolves\n SuspendedOnData : // Don't suspend work loop, except to check if the data has\n // immediately resolved (i.e. in a microtask). Otherwise, trigger the\n // nearest Suspense fallback.\n SuspendedOnImmediate;\n } else if (thrownValue === SuspenseyCommitException) {\n thrownValue = getSuspendedThenable();\n workInProgressSuspendedReason = SuspendedOnInstance;\n } else if (thrownValue === SelectiveHydrationException) {\n // An update flowed into a dehydrated boundary. Before we can apply the\n // update, we need to finish hydrating. Interrupt the work-in-progress\n // render so we can restart at the hydration lane.\n //\n // The ideal implementation would be able to switch contexts without\n // unwinding the current stack.\n //\n // We could name this something more general but as of now it's the only\n // case where we think this should happen.\n workInProgressSuspendedReason = SuspendedOnHydration;\n } else {\n // This is a regular error.\n var isWakeable = thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function';\n workInProgressSuspendedReason = isWakeable ? // A wakeable object was thrown by a legacy Suspense implementation.\n // This has slightly different behavior than suspending with `use`.\n SuspendedOnDeprecatedThrowPromise : // This is a regular error. If something earlier in the component already\n // suspended, we must clear the thenable state to unblock the work loop.\n SuspendedOnError;\n }\n\n workInProgressThrownValue = thrownValue;\n var erroredWork = workInProgress;\n\n if (erroredWork === null) {\n // This is a fatal error\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue;\n return;\n }\n\n if (erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n {\n markComponentRenderStopped();\n\n switch (workInProgressSuspendedReason) {\n case SuspendedOnError:\n {\n markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n break;\n }\n\n case SuspendedOnData:\n case SuspendedOnImmediate:\n case SuspendedOnDeprecatedThrowPromise:\n case SuspendedAndReadyToContinue:\n {\n var wakeable = thrownValue;\n markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n break;\n }\n }\n }\n}\n\nfunction shouldRemainOnPreviousScreen() {\n // This is asking whether it's better to suspend the transition and remain\n // on the previous screen, versus showing a fallback as soon as possible. It\n // takes into account both the priority of render and also whether showing a\n // fallback would produce a desirable user experience.\n // TODO: Once `use` has fully replaced the `throw promise` pattern, we should\n // be able to remove the equivalent check in finishConcurrentRender, and rely\n // just on this one.\n if (includesOnlyTransitions(workInProgressRootRenderLanes)) {\n if (getShellBoundary() === null) {\n // We're rendering inside the \"shell\" of the app. Activating the nearest\n // fallback would cause visible content to disappear. It's better to\n // suspend the transition and remain on the previous screen.\n return true;\n } else {\n // We're rendering content that wasn't part of the previous screen.\n // Rather than block the transition, it's better to show a fallback as\n // soon as possible. The appearance of any nested fallbacks will be\n // throttled to avoid jank.\n return false;\n }\n }\n\n var handler = getSuspenseHandler();\n\n if (handler === null) ; else {\n if (includesOnlyRetries(workInProgressRootRenderLanes) || // In this context, an OffscreenLane counts as a Retry\n // TODO: It's become increasingly clear that Retries and Offscreen are\n // deeply connected. They probably can be unified further.\n includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {\n // During a retry, we can suspend rendering if the nearest Suspense boundary\n // is the boundary of the \"shell\", because we're guaranteed not to block\n // any new content from appearing.\n //\n // The reason we must check if this is a retry is because it guarantees\n // that suspending the work loop won't block an actual update, because\n // retries don't \"update\" anything; they fill in fallbacks that were left\n // behind by a previous transition.\n return handler === getShellBoundary();\n }\n } // For all other Lanes besides Transitions and Retries, we should not wait\n // for the data to load.\n\n\n return false;\n}\n\nfunction pushDispatcher(container) {\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher.current = prevDispatcher;\n}\n\nfunction pushCacheDispatcher() {\n {\n var prevCacheDispatcher = ReactCurrentCache.current;\n ReactCurrentCache.current = DefaultCacheDispatcher;\n return prevCacheDispatcher;\n }\n}\n\nfunction popCacheDispatcher(prevCacheDispatcher) {\n {\n ReactCurrentCache.current = prevCacheDispatcher;\n }\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now$1();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = RootSuspendedWithDelay; // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n // TODO: Consider unwinding immediately, using the\n // SuspendedOnHydration mechanism.\n // $FlowFixMe[incompatible-call] need null check workInProgressRoot\n markRootSuspended(workInProgressRoot, workInProgressRootRenderLanes);\n }\n}\nfunction renderDidError(error) {\n if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n workInProgressRootExitStatus = RootErrored;\n }\n\n if (workInProgressRootConcurrentErrors === null) {\n workInProgressRootConcurrentErrors = [error];\n } else {\n workInProgressRootConcurrentErrors.push(error);\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootInProgress;\n} // TODO: Over time, this function and renderRootConcurrent have become more\n// and more similar. Not sure it makes sense to maintain forked paths. Consider\n// unifying them again.\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n var didSuspendInShell = false;\n\n outer: do {\n try {\n if (workInProgressSuspendedReason !== NotSuspended && workInProgress !== null) {\n // The work loop is suspended. During a synchronous render, we don't\n // yield to the main thread. Immediately unwind the stack. This will\n // trigger either a fallback or an error boundary.\n // TODO: For discrete and \"default\" updates (anything that's not\n // flushSync), we want to wait for the microtasks the flush before\n // unwinding. Will probably implement this using renderRootConcurrent,\n // or merge renderRootSync and renderRootConcurrent into the same\n // function and fork the behavior some other way.\n var unitOfWork = workInProgress;\n var thrownValue = workInProgressThrownValue;\n\n switch (workInProgressSuspendedReason) {\n case SuspendedOnHydration:\n {\n // Selective hydration. An update flowed into a dehydrated tree.\n // Interrupt the current render so the work loop can switch to the\n // hydration lane.\n resetWorkInProgressStack();\n workInProgressRootExitStatus = RootDidNotComplete;\n break outer;\n }\n\n case SuspendedOnImmediate:\n case SuspendedOnData:\n {\n if (!didSuspendInShell && getSuspenseHandler() === null) {\n didSuspendInShell = true;\n } // Intentional fallthrough\n\n }\n\n default:\n {\n // Unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(unitOfWork, thrownValue);\n break;\n }\n }\n }\n\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleThrow(root, thrownValue);\n }\n } while (true); // Check if something suspended in the shell. We use this to detect an\n // infinite ping loop caused by an uncached promise.\n //\n // Only increment this counter once per synchronous render attempt across the\n // whole tree. Even if there are many sibling components that suspend, this\n // counter only gets incremented once.\n\n\n if (didSuspendInShell) {\n root.shellSuspendCounter++;\n }\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n popCacheDispatcher(prevCacheDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n }\n\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // It's safe to process the queue now that the render phase is complete.\n\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Perform work without checking if we need to yield between fiber.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n outer: do {\n try {\n if (workInProgressSuspendedReason !== NotSuspended && workInProgress !== null) {\n // The work loop is suspended. We need to either unwind the stack or\n // replay the suspended component.\n var unitOfWork = workInProgress;\n var thrownValue = workInProgressThrownValue;\n\n resumeOrUnwind: switch (workInProgressSuspendedReason) {\n case SuspendedOnError:\n {\n // Unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnData:\n {\n var thenable = thrownValue;\n\n if (isThenableResolved(thenable)) {\n // The data resolved. Try rendering the component again.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(unitOfWork);\n break;\n } // The work loop is suspended on data. We should wait for it to\n // resolve before continuing to render.\n // TODO: Handle the case where the promise resolves synchronously.\n // Usually this is handled when we instrument the promise to add a\n // `status` field, but if the promise already has a status, we won't\n // have added a listener until right here.\n\n\n var onResolution = function () {\n // Check if the root is still suspended on this promise.\n if (workInProgressSuspendedReason === SuspendedOnData && workInProgressRoot === root) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n } // Ensure the root is scheduled. We should do this even if we're\n // currently working on a different root, so that we resume\n // rendering later.\n\n\n ensureRootIsScheduled(root);\n };\n\n thenable.then(onResolution, onResolution);\n break outer;\n }\n\n case SuspendedOnImmediate:\n {\n // If this fiber just suspended, it's possible the data is already\n // cached. Yield to the main thread to give it a chance to ping. If\n // it does, we can retry immediately without unwinding the stack.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n break outer;\n }\n\n case SuspendedOnInstance:\n {\n workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;\n break outer;\n }\n\n case SuspendedAndReadyToContinue:\n {\n var _thenable = thrownValue;\n\n if (isThenableResolved(_thenable)) {\n // The data resolved. Try rendering the component again.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(unitOfWork);\n } else {\n // Otherwise, unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(unitOfWork, thrownValue);\n }\n\n break;\n }\n\n case SuspendedOnInstanceAndReadyToContinue:\n {\n switch (workInProgress.tag) {\n case HostComponent:\n case HostHoistable:\n case HostSingleton:\n {\n // Before unwinding the stack, check one more time if the\n // instance is ready. It may have loaded when React yielded to\n // the main thread.\n // Assigning this to a constant so Flow knows the binding won't\n // be mutated by `preloadInstance`.\n var hostFiber = workInProgress;\n var type = hostFiber.type;\n var props = hostFiber.pendingProps;\n var isReady = preloadInstance(type, props);\n\n if (isReady) {\n // The data resolved. Resume the work loop as if nothing\n // suspended. Unlike when a user component suspends, we don't\n // have to replay anything because the host fiber\n // already completed.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n var sibling = hostFiber.sibling;\n\n if (sibling !== null) {\n workInProgress = sibling;\n } else {\n var returnFiber = hostFiber.return;\n\n if (returnFiber !== null) {\n workInProgress = returnFiber;\n completeUnitOfWork(returnFiber);\n } else {\n workInProgress = null;\n }\n }\n\n break resumeOrUnwind;\n }\n\n break;\n }\n\n default:\n {\n // This will fail gracefully but it's not correct, so log a\n // warning in dev.\n if (true) {\n error('Unexpected type of fiber triggered a suspensey commit. ' + 'This is a bug in React.');\n }\n\n break;\n }\n } // Otherwise, unwind then continue with the normal work loop.\n\n\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnDeprecatedThrowPromise:\n {\n // Suspended by an old implementation that uses the `throw promise`\n // pattern. The newer replaying behavior can cause subtle issues\n // like infinite ping loops. So we maintain the old behavior and\n // always unwind.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnHydration:\n {\n // Selective hydration. An update flowed into a dehydrated tree.\n // Interrupt the current render so the work loop can switch to the\n // hydration lane.\n resetWorkInProgressStack();\n workInProgressRootExitStatus = RootDidNotComplete;\n break outer;\n }\n\n default:\n {\n throw new Error('Unexpected SuspendedReason. This is a bug in React.');\n }\n }\n }\n\n if ( true && ReactCurrentActQueue.current !== null) {\n // `act` special case: If we're inside an `act` scope, don't consult\n // `shouldYield`. Always keep working until the render is complete.\n // This is not just an optimization: in a unit test environment, we\n // can't trust the result of `shouldYield`, because the host I/O is\n // likely mocked.\n workLoopSync();\n } else {\n workLoopConcurrent();\n }\n\n break;\n } catch (thrownValue) {\n handleThrow(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n popDispatcher(prevDispatcher);\n popCacheDispatcher(prevCacheDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n // Still work remaining.\n {\n markRenderYielded();\n }\n\n return RootInProgress;\n } else {\n // Completed the tree.\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // It's safe to process the queue now that the render phase is complete.\n\n finishQueueingConcurrentUpdates(); // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n // $FlowFixMe[incompatible-call] found when upgrading Flow\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork(current, unitOfWork, renderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork(current, unitOfWork, renderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$1.current = null;\n}\n\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n // This is a fork of performUnitOfWork specifcally for replaying a fiber that\n // just suspended.\n //\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n setCurrentFiber(unitOfWork);\n var isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;\n\n if (isProfilingMode) {\n startProfilerTimer(unitOfWork);\n }\n\n switch (unitOfWork.tag) {\n case IndeterminateComponent:\n {\n // Because it suspended with `use`, we can assume it's a\n // function component.\n unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.\n }\n\n case SimpleMemoComponent:\n case FunctionComponent:\n {\n // Resolve `defaultProps`. This logic is copied from `beginWork`.\n // TODO: Consider moving this switch statement into that module. Also,\n // could maybe use this as an opportunity to say `use` doesn't work with\n // `defaultProps` :)\n var Component = unitOfWork.type;\n var unresolvedProps = unitOfWork.pendingProps;\n var resolvedProps = unitOfWork.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(unitOfWork, Component, true);\n context = getMaskedContext(unitOfWork, unmaskedContext);\n }\n\n next = replayFunctionComponent(current, unitOfWork, resolvedProps, Component, context, workInProgressRootRenderLanes);\n break;\n }\n\n case ForwardRef:\n {\n // Resolve `defaultProps`. This logic is copied from `beginWork`.\n // TODO: Consider moving this switch statement into that module. Also,\n // could maybe use this as an opportunity to say `use` doesn't work with\n // `defaultProps` :)\n var _Component = unitOfWork.type.render;\n var _unresolvedProps = unitOfWork.pendingProps;\n\n var _resolvedProps = unitOfWork.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n next = replayFunctionComponent(current, unitOfWork, _resolvedProps, _Component, unitOfWork.ref, workInProgressRootRenderLanes);\n break;\n }\n\n case HostComponent:\n {\n // Some host components are stateful (that's how we implement form\n // actions) but we don't bother to reuse the memoized state because it's\n // not worth the extra code. The main reason to reuse the previous hooks\n // is to reuse uncached promises, but we happen to know that the only\n // promises that a host component might suspend on are definitely cached\n // because they are controlled by us. So don't bother.\n resetHooksOnUnwind(unitOfWork); // Fallthrough to the next branch.\n }\n\n default:\n {\n // Other types besides function components are reset completely before\n // being replayed. Currently this only happens when a Usable type is\n // reconciled — the reconciler will suspend.\n //\n // We reset the fiber back to its original state; however, this isn't\n // a full \"unwind\" because we're going to reuse the promises that were\n // reconciled previously. So it's intentional that we don't call\n // resetSuspendedWorkLoopOnUnwind here.\n unwindInterruptedWork(current, unitOfWork);\n unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, renderLanes);\n next = beginWork(current, unitOfWork, renderLanes);\n break;\n }\n }\n\n if (isProfilingMode) {\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } // The begin phase finished successfully without suspending. Return to the\n // normal work loop.\n\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$1.current = null;\n}\n\nfunction throwAndUnwindWorkLoop(unitOfWork, thrownValue) {\n // This is a fork of performUnitOfWork specifcally for unwinding a fiber\n // that threw an exception.\n //\n // Return to the normal work loop. This will unwind the stack, and potentially\n // result in showing a fallback.\n resetSuspendedWorkLoopOnUnwind(unitOfWork);\n var returnFiber = unitOfWork.return;\n\n if (returnFiber === null || workInProgressRoot === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n try {\n // Find and mark the nearest Suspense or error boundary that can handle\n // this \"exception\".\n throwException(workInProgressRoot, returnFiber, unitOfWork, thrownValue, workInProgressRootRenderLanes);\n } catch (error) {\n // We had trouble processing the error. An example of this happening is\n // when accessing the `componentDidCatch` property of an error boundary\n // throws an error. A weird edge case. There's a regression test for this.\n // To prevent an infinite loop, bubble the error up to the next parent.\n workInProgress = returnFiber;\n throw error;\n }\n\n if (unitOfWork.flags & Incomplete) {\n // Unwind the stack until we reach the nearest boundary.\n unwindUnitOfWork(unitOfWork);\n } else {\n // Although the fiber suspended, we're intentionally going to commit it in\n // an inconsistent state. We can do this safely in cases where we know the\n // inconsistent tree will be hidden.\n //\n // This currently only applies to Legacy Suspense implementation, but we may\n // port a version of this to concurrent roots, too, when performing a\n // synchronous render. Because that will allow us to mutate the tree as we\n // go instead of buffering mutations until the end. Though it's unclear if\n // this particular path is how that would be implemented.\n completeUnitOfWork(unitOfWork);\n }\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n {\n if ((completedWork.flags & Incomplete) !== NoFlags$1) {\n // NOTE: If we re-enable sibling prerendering in some cases, this branch\n // is where we would switch to the unwinding path.\n error('Internal React error: Expected this fiber to be complete, but ' + \"it isn't. It should have been unwound. This is a bug in React.\");\n }\n } // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n\n\n var current = completedWork.alternate;\n var returnFiber = completedWork.return;\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ((completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, renderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, renderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction unwindUnitOfWork(unitOfWork) {\n var incompleteWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = incompleteWork.alternate; // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n\n var next = unwindWork(current, incompleteWork); // Because this fiber did not complete, don't reset its lanes.\n\n if (next !== null) {\n // Found a boundary that can handle this exception. Re-renter the\n // begin phase. This branch will return us to the normal work loop.\n //\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n next.flags &= HostEffectMask;\n workInProgress = next;\n return;\n } // Keep unwinding until we reach either a boundary or the root.\n\n\n if ((incompleteWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(incompleteWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = incompleteWork.actualDuration;\n var child = incompleteWork.child;\n\n while (child !== null) {\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n incompleteWork.actualDuration = actualDuration;\n } // TODO: Once we stop prerendering siblings, instead of resetting the parent\n // of the node being unwound, we should be able to reset node itself as we\n // unwind the stack. Saves an additional null check.\n\n\n var returnFiber = incompleteWork.return;\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its subtree flags.\n // TODO: Once we stop prerendering siblings, we may be able to get rid of\n // the Incomplete flag because unwinding to the nearest boundary will\n // happen synchronously.\n returnFiber.flags |= Incomplete;\n returnFiber.subtreeFlags = NoFlags$1;\n returnFiber.deletions = null;\n } // NOTE: If we re-enable sibling prerendering in some cases, here we\n // would switch to the normal completion path: check if a sibling\n // exists, and if so, begin work on it.\n // Otherwise, return to the parent\n // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n incompleteWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = incompleteWork;\n } while (incompleteWork !== null); // We've unwound all the way to the root.\n\n\n workInProgressRootExitStatus = RootDidNotComplete;\n workInProgress = null;\n}\n\nfunction commitRoot(root, recoverableErrors, transitions) {\n // TODO: This no longer makes any sense. We already wrap the mutation and\n // layout phases. Should be able to remove.\n var previousUpdateLanePriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n setCurrentUpdatePriority(previousUpdateLanePriority);\n }\n\n return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n {\n markCommitStarted(lanes);\n }\n\n if (finishedWork === null) {\n\n {\n markCommitStopped();\n }\n\n return null;\n } else {\n {\n if (lanes === NoLanes) {\n error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n }\n }\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (finishedWork === root.current) {\n throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n root.cancelPendingCommit = null; // Check which lanes no longer have any work scheduled on them, and mark\n // those as finished.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes); // Make sure to account for lanes that were updated by a concurrent event\n // during the render phase; don't mark them as finished.\n\n var concurrentlyUpdatedLanes = getConcurrentlyUpdatedLanes();\n remainingLanes = mergeLanes(remainingLanes, concurrentlyUpdatedLanes);\n markRootFinished(root, remainingLanes);\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // If there are pending passive effects, schedule a callback to process them.\n // Do this as early as possible, so it is queued before anything else that\n // might get scheduled in the commit phase. (See #16714.)\n // TODO: Delete all other places that schedule the passive effect callback\n // They're redundant.\n\n\n if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags$1 || (finishedWork.flags & PassiveMask) !== NoFlags$1) {\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n pendingPassiveEffectsRemainingLanes = remainingLanes; // workInProgressTransitions might be overwritten, so we want\n // to store it in pendingPassiveTransitions until they get processed\n // We need to pass this through as an argument to commitRoot\n // because workInProgressTransitions might have changed between\n // the previous render and commit if we throttle the commit\n // with setTimeout\n\n pendingPassiveTransitions = transitions;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n // *after* passive effects fire to avoid freeing a cache pool that may\n // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n return null;\n });\n }\n } // Check if there are any effects in the whole tree.\n // TODO: This is left over from the effect list implementation, where we had\n // to check for the existence of `firstEffect` to satisfy Flow. I think the\n // only other reason this optimization exists is because it affects profiling.\n // Reconsider whether this is necessary.\n\n\n var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags$1;\n var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags$1;\n\n if (subtreeHasEffects || rootHasEffect) {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = null;\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(DiscreteEventPriority);\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext; // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$1.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n commitBeforeMutationEffects(root, finishedWork);\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n }\n\n\n commitMutationEffects(root, finishedWork, lanes);\n\n resetAfterCommit(); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n\n {\n markLayoutEffectsStarted(lanes);\n }\n\n commitLayoutEffects(finishedWork, root, lanes);\n\n {\n markLayoutEffectsStopped();\n }\n // opportunity to paint.\n\n\n requestPaint();\n executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n } else {\n // There were no passive effects, so we can immediately release the cache\n // pool for this render.\n releaseRootPooledCache(root, remainingLanes);\n\n {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n // is to detect whether something might have called setState inside\n // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n // inside `componentDidCatch` is itself flawed — that's why we recommend\n // `getDerivedStateFromError` instead. However, it could be improved by\n // checking if remainingLanes includes Sync work, instead of whether there's\n // any work remaining at all (which would also include stuff like Suspense\n // retries or transitions). It's been like this for a while, though, so fixing\n // it probably isn't that urgent.\n\n if (remainingLanes === NoLanes) {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n commitDoubleInvokeEffectsInDEV(root, false);\n }\n }\n\n onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel);\n\n {\n if (isDevToolsPresent) {\n root.memoizedUpdaters.clear();\n }\n }\n\n {\n onCommitRoot();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root);\n\n if (recoverableErrors !== null) {\n // There were errors during this render, but recovered from them without\n // needing to surface it to the UI. We log them here.\n var onRecoverableError = root.onRecoverableError;\n\n for (var i = 0; i < recoverableErrors.length; i++) {\n var recoverableError = recoverableErrors[i];\n var errorInfo = makeErrorInfo(recoverableError.digest, recoverableError.stack);\n onRecoverableError(recoverableError.value, errorInfo);\n }\n }\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var error$1 = firstUncaughtError;\n firstUncaughtError = null;\n throw error$1;\n } // If the passive effects are the result of a discrete render, flush them\n // synchronously at the end of the current task so that the result is\n // immediately observable. Otherwise, we assume that they are not\n // order-dependent and do not need to be observed by external systems, so we\n // can wait until after paint.\n // TODO: We can optimize this by not scheduling the callback earlier. Since we\n // currently schedule the callback in multiple places, will wait until those\n // are consolidated.\n\n\n if (includesSyncLane(pendingPassiveEffectsLanes) && root.tag !== LegacyRoot) {\n flushPassiveEffects();\n } // Read this again, since a passive effect might have updated it\n\n\n remainingLanes = root.pendingLanes;\n\n if (includesSyncLane(remainingLanes)) {\n {\n markNestedUpdateScheduled();\n } // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n\n\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncWorkOnAllRoots();\n\n {\n markCommitStopped();\n }\n\n return null;\n}\n\nfunction makeErrorInfo(digest, componentStack) {\n {\n var errorInfo = {\n componentStack: componentStack,\n digest: digest\n };\n Object.defineProperty(errorInfo, 'digest', {\n configurable: false,\n enumerable: true,\n get: function () {\n error('You are accessing \"digest\" from the errorInfo object passed to onRecoverableError.' + ' This property is deprecated and will be removed in a future version of React.' + ' To access the digest of an Error look for this property on the Error instance itself.');\n\n return digest;\n }\n });\n return errorInfo;\n }\n}\n\nfunction releaseRootPooledCache(root, remainingLanes) {\n {\n var pooledCacheLanes = root.pooledCacheLanes &= remainingLanes;\n\n if (pooledCacheLanes === NoLanes) {\n // None of the remaining work relies on the cache pool. Clear it so\n // subsequent requests get a new cache\n var pooledCache = root.pooledCache;\n\n if (pooledCache != null) {\n root.pooledCache = null;\n releaseCache(pooledCache);\n }\n }\n }\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n // probably just combine the two functions. I believe they were only separate\n // in the first place because we used to wrap it with\n // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n // priority within React itself, so we can mutate the variable directly.\n if (rootWithPendingPassiveEffects !== null) {\n // Cache the root since rootWithPendingPassiveEffects is cleared in\n // flushPassiveEffectsImpl\n var root = rootWithPendingPassiveEffects; // Cache and clear the remaining lanes flag; it must be reset since this\n // method can be called from various places, not always from commitRoot\n // where the remaining lanes are known\n\n var remainingLanes = pendingPassiveEffectsRemainingLanes;\n pendingPassiveEffectsRemainingLanes = NoLanes;\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n // chance to retain cache instances they use - release the pooled\n // cache at the root (if there is one)\n\n releaseRootPooledCache(root, remainingLanes);\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n {\n pendingPassiveProfilerEffects.push(fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n } // Cache and clear the transitions flag\n\n\n var transitions = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n // Figure out why and fix it. It's not causing any known issues (probably\n // because it's only used for profiling), but it's a refactor hazard.\n\n pendingPassiveEffectsLanes = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Cannot flush passive effects while already rendering.');\n }\n\n {\n isFlushingPassiveEffects = true;\n didScheduleUpdateDuringPassiveEffects = false;\n }\n\n {\n markPassiveEffectsStarted(lanes);\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n commitPassiveUnmountEffects(root.current);\n commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n {\n var profilerEffects = pendingPassiveProfilerEffects;\n pendingPassiveProfilerEffects = [];\n\n for (var i = 0; i < profilerEffects.length; i++) {\n var fiber = profilerEffects[i];\n commitPassiveEffectDurations(root, fiber);\n }\n }\n\n {\n markPassiveEffectsStopped();\n }\n\n {\n commitDoubleInvokeEffectsInDEV(root, true);\n }\n\n executionContext = prevExecutionContext;\n flushSyncWorkOnAllRoots();\n\n {\n // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n } else {\n nestedPassiveUpdateCount = 0;\n }\n\n isFlushingPassiveEffects = false;\n didScheduleUpdateDuringPassiveEffects = false;\n } // TODO: Move to commitPassiveMountEffects\n\n\n onPostCommitRoot(root);\n\n {\n var stateNode = root.current.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValueAtFiber(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n var root = enqueueUpdate(rootFiber, update, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane);\n ensureRootIsScheduled(root);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n {\n reportUncaughtErrorInDEV(error$1);\n setIsRunningInsertionEffect(false);\n }\n\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);\n return;\n }\n\n var fiber = nearestMountedAncestor;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n var root = enqueueUpdate(fiber, update, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane);\n ensureRootIsScheduled(root);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n\n {\n error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Potential ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a ping listener\n //\n // The data might resolve before we have a chance to commit the fallback. Or,\n // in the case of a refresh, we'll never commit a fallback. So we need to\n // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n // try rendering the tree again.\n //\n // Only attach a listener if one does not already exist for the lanes\n // we're currently rendering (which acts like a \"thread ID\" here).\n //\n // We only need to do this in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n workInProgressRootDidAttachPingListener = true; // Memoize using the thread ID to prevent redundant listeners.\n\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, lanes);\n }\n }\n\n wakeable.then(ping, ping);\n }\n}\n\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n markRootPinged(root, pingedLanes);\n warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Force a restart from the root by unwinding the stack. Unless this is\n // being called from the render phase, because that would cause a crash.\n if ((executionContext & RenderContext) === NoContext) {\n prepareFreshStack(root, NoLanes);\n }\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new lanes.\n if (retryLane === NoLane) {\n // TODO: Assign this to `suspenseState.retryLane`? to avoid\n // unnecessary entanglement?\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane);\n ensureRootIsScheduled(root);\n }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState;\n var retryLane = NoLane;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n switch (boundaryFiber.tag) {\n case SuspenseComponent:\n retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n break;\n\n case SuspenseListComponent:\n retryCache = boundaryFiber.stateNode;\n break;\n\n case OffscreenComponent:\n {\n var instance = boundaryFiber.stateNode;\n retryCache = instance._retryCache;\n break;\n }\n\n default:\n throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction throwIfInfiniteUpdateLoopDetected() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n nestedPassiveUpdateCount = 0;\n rootWithNestedUpdates = null;\n rootWithPassiveNestedUpdates = null;\n throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n}\n\nfunction commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) {\n {\n {\n legacyCommitDoubleInvokeEffectsInDEV(root.current, hasPassiveEffects);\n }\n }\n}\n\nfunction legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n // Maybe not a big deal since this is DEV only behavior.\n setCurrentFiber(fiber);\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n }\n\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n }\n\n resetCurrentFiber();\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n var current = firstChild;\n var subtreeRoot = null;\n\n while (current != null) {\n var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n if (current !== subtreeRoot && current.child != null && primarySubtreeFlag !== NoFlags$1) {\n current = current.child;\n } else {\n if ((current.flags & fiberFlags) !== NoFlags$1) {\n invokeEffectFn(current);\n }\n\n if (current.sibling !== null) {\n current = current.sibling;\n } else {\n current = subtreeRoot = current.return;\n }\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & ConcurrentMode)) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\nvar beginWork;\n\n{\n var dummyFiber = null;\n\n beginWork = function (current, unitOfWork, lanes) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork$1(current, unitOfWork, lanes);\n } catch (originalError) {\n if (didSuspendOrErrorWhileHydratingDEV() || originalError === SuspenseException || originalError === SelectiveHydrationException || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises.\n // Don't replay errors if we are hydrating and have already suspended or handled an error\n throw originalError;\n } // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n\n resetSuspendedWorkLoopOnUnwind(unitOfWork);\n unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if (unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork$1, null, current, unitOfWork, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError();\n\n if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n originalError._suppressLogging = true;\n }\n } // We always throw the original error in case the second render pass is not idempotent.\n // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n\n throw originalError;\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction restorePendingUpdaters(root, lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n memoizedUpdaters.forEach(function (schedulingFiber) {\n addFiberToLanesMap(root, schedulingFiber, lanes);\n }); // This function intentionally does not clear memoized updaters.\n // Those may still be relevant to the current commit\n // and a future one (e.g. Suspense).\n }\n }\n}\nvar fakeActCallbackNode = {}; // $FlowFixMe[missing-local-annot]\n\nfunction scheduleCallback(priorityLevel, callback) {\n {\n // If we're currently inside an `act` scope, bypass Scheduler and push to\n // the `act` queue instead.\n var actQueue = ReactCurrentActQueue.current;\n\n if (actQueue !== null) {\n actQueue.push(callback);\n return fakeActCallbackNode;\n } else {\n return scheduleCallback$3(priorityLevel, callback);\n }\n }\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return ReactCurrentActQueue.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n {\n if (fiber.mode & ConcurrentMode) {\n if (!isConcurrentActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n } else {\n // Legacy mode has additional cases where we suppress a warning.\n if (!isLegacyActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n\n if (executionContext !== NoContext) {\n // Legacy mode doesn't warn if the update is batched, i.e.\n // batchedUpdates or flushSync.\n return;\n }\n\n if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n // For backwards compatibility with pre-hooks code, legacy mode only\n // warns for updates that originate from a hook.\n return;\n }\n }\n\n if (ReactCurrentActQueue.current === null) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n {\n if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue.current === null) {\n error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + ' /* finish loading suspended data */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');\n }\n }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n {\n isRunningInsertionEffect = isRunning;\n }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\n// Used by React Refresh runtime through DevTools Global Hook.\n\nvar resolveFamily = null;\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType); // $FlowFixMe[not-a-function] found when upgrading Flow\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync$1(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync$1(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || // $FlowFixMe[incompatible-use] found when upgrading Flow\n alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostSingleton:\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent || (node.tag === HostHoistable ) || (node.tag === HostSingleton )) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.refCleanup = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags$1;\n this.subtreeFlags = NoFlags$1;\n this.deletions = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nfunction createFiber(tag, pendingProps, key, mode) {\n // $FlowFixMe[invalid-constructor]: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags$1; // The effects are no longer valid.\n\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.deletions = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n } // Reset all effects except static ones.\n // Static effects are not specific to a render.\n\n\n workInProgress.flags = current.flags & StaticMask;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect flags but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.deletions = null;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode;\n\n if (isStrictMode === true || createRootStrictEffectsByDefault) {\n mode |= StrictLegacyMode | StrictEffectsMode;\n }\n } else {\n mode = NoMode;\n }\n\n if (isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point–\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n {\n var hostContext = getHostContext();\n fiberTag = isHostHoistableType(type, pendingProps, hostContext) ? HostHoistable : isHostSingletonType(type) ? HostSingleton : HostComponent;\n }\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictLegacyMode;\n\n if ((mode & ConcurrentMode) !== NoMode) {\n // Strict effects should never run on legacy roots\n mode |= StrictEffectsMode;\n }\n\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n\n // Fall through\n\n case REACT_SCOPE_TYPE:\n\n // Fall through\n\n case REACT_CACHE_TYPE:\n {\n return createFiberFromCache(pendingProps, mode, lanes, key);\n }\n\n // Fall through\n\n case REACT_TRACING_MARKER_TYPE:\n\n // Fall through\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n\n // Fall through\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n var primaryChildInstance = {\n _visibility: OffscreenVisible,\n _pendingVisibility: OffscreenVisible,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null,\n _current: null,\n detach: function () {\n return detachOffscreenInstance(primaryChildInstance);\n },\n attach: function () {\n return attachOffscreenInstance(primaryChildInstance);\n }\n };\n fiber.stateNode = primaryChildInstance;\n return fiber;\n}\nfunction createFiberFromCache(pendingProps, mode, lanes, key) {\n var fiber = createFiber(CacheComponent, pendingProps, key, mode);\n fiber.elementType = REACT_CACHE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode);\n fiber.elementType = 'DELETED';\n return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.refCleanup = source.refCleanup;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.subtreeFlags = source.subtreeFlags;\n target.deletions = source.deletions;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, // $FlowFixMe[missing-local-annot]\ntag, hydrate, identifierPrefix, onRecoverableError) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.cancelPendingCommit = null;\n this.context = null;\n this.pendingContext = null;\n this.next = null;\n this.callbackNode = null;\n this.callbackPriority = NoLane;\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.errorRecoveryDisabledLanes = NoLanes;\n this.shellSuspendCounter = 0;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n\n {\n this.pooledCache = null;\n this.pooledCacheLanes = NoLanes;\n }\n\n this.incompleteTransitions = new Map();\n\n {\n this.effectDuration = 0;\n this.passiveEffectDuration = 0;\n }\n\n {\n this.memoizedUpdaters = new Set();\n var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n for (var _i = 0; _i < TotalLanes; _i++) {\n pendingUpdatersLaneMap.push(new Set());\n }\n }\n\n {\n switch (tag) {\n case ConcurrentRoot:\n this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks) {\n // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n\n {\n var initialCache = createCache();\n retainCache(initialCache); // The pooledCache is a fresh cache instance that is used temporarily\n // for newly mounted boundaries during a render. In general, the\n // pooledCache is always cleared from the root at the end of a render:\n // it is either released when render commits, or moved to an Offscreen\n // component if rendering suspends. Because the lifetime of the pooled\n // cache is distinct from the main memoizedState.cache, it must be\n // retained separately.\n\n root.pooledCache = initialCache;\n retainCache(initialCache);\n var initialState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: initialCache\n };\n uninitializedFiber.memoizedState = initialState;\n }\n\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\nvar ReactVersion = '18.3.0-canary-7118f5dd7-20230705';\n\nfunction createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n {\n checkKeyStringCoercion(key);\n }\n\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\n// Might add PROFILE later.\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n throw new Error('Unable to find node on an unmounted component.');\n } else {\n var keys = Object.keys(component).join(',');\n throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictLegacyMode) {\n var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictLegacyMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return getPublicInstance(hostFiber.stateNode);\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = false;\n var initialChildren = null;\n return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = true;\n var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n // a regular update because the initial render must match was was rendered\n // on the server.\n // NOTE: This update intentionally doesn't have a payload. We're only using\n // the update to schedule work on the root fiber (and, for legacy roots, to\n // enqueue the callback if one is provided).\n\n var current = root.current;\n var lane = requestUpdateLane(current);\n var update = createUpdate(lane);\n update.callback = callback !== undefined && callback !== null ? callback : null;\n enqueueUpdate(current, update, lane);\n scheduleInitialHydrationOnRoot(root, lane);\n return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var lane = requestUpdateLane(current$1);\n\n {\n markRenderScheduled(lane);\n }\n\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');\n }\n }\n\n var update = createUpdate(lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(current$1, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, current$1, lane);\n entangleTransitions(root, current$1, lane);\n }\n\n return lane;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostSingleton:\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\nfunction attemptSynchronousHydration(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n {\n var root = fiber.stateNode;\n\n if (isRootDehydrated(root)) {\n // Flush the first scheduled \"update\".\n var lanes = getHighestPriorityPendingLanes(root);\n flushRoot(root, lanes);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n flushSync$1(function () {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }); // If we're still blocked after this, we need to increase\n // the priority of any promises resolving within this\n // boundary so that they next attempt also has higher pri.\n\n var retryLane = SyncLane;\n markRetryLaneIfNotHydrated(fiber, retryLane);\n break;\n }\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n}\n\nfunction attemptContinuousHydration(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var lane = SelectiveHydrationLane;\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var lane = requestUpdateLane(fiber);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return getPublicInstance(hostFiber.stateNode);\n}\n\nvar shouldErrorImpl = function (fiber) {\n return null;\n};\n\nfunction shouldError(fiber) {\n return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe[incompatible-use] number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe[incompatible-use] number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe[incompatible-use] number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe[incompatible-use] number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n scheduleUpdate = function (fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n setErrorHandler = function (newShouldErrorImpl) {\n shouldErrorImpl = newShouldErrorImpl;\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setErrorHandler: setErrorHandler,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools ,\n // Enables DevTools to detect reconciler version rather than renderer version\n // which may not match for third party renderers.\n reconcilerVersion: ReactVersion\n });\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n\nvar isInsideEventHandler = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n // TODO: Restore state in the microtask, after the discrete updates flush,\n // instead of early flushing them here.\n flushSync$1();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, a, b) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdates$1(fn, a, b);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n} // TODO: Replace with flushSync\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (listener && typeof listener !== 'function') {\n throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {};\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n // $FlowFixMe[missing-this-annot]\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n\n var normalize = Interface[propName];\n\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n assign(SyntheticBaseEvent.prototype, {\n // $FlowFixMe[missing-this-annot]\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe[illegal-typeof] - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n // $FlowFixMe[missing-this-annot]\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe[illegal-typeof] - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n lastMovementX = event.screenX - lastMouseEvent.screenX; // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = // $FlowFixMe[invalid-computed-prop] unable to index with a `mixed` value\n normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n // $FlowFixMe[invalid-computed-prop] unable to index with a `mixed` value\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n// $FlowFixMe[missing-local-annot]\n// $FlowFixMe[missing-this-annot]\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\n// has this definition built-in.\n\nvar hasScheduledReplayAttempt = false; // The last of each continuous event type. We only need to replay the last one\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset' // 'submit', // stopPropagation blocks the replay mechanism\n];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n} // Resets the replaying for this type of continuous event to no event.\n\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(fiber);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction queueExplicitHydrationTarget(target) {\n // TODO: This will read the priority if it's dispatched by the React\n // event system but not native events. Should read window.event.type, like\n // we do for updates (getCurrentEventPriority).\n var updatePriority = getCurrentUpdatePriority();\n var queuedTarget = {\n blockedOn: null,\n target: target,\n priority: updatePriority\n };\n var i = 0;\n\n for (; i < queuedExplicitHydrationTargets.length; i++) {\n // Stop once we hit the first target with lower priority than\n if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n break;\n }\n }\n\n queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n if (i === 0) {\n attemptExplicitHydrationTarget(queuedTarget);\n }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n\n if (nextBlockedOn === null) {\n var nativeEvent = queuedEvent.nativeEvent;\n var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n setReplayingEvent(nativeEventClone);\n nativeEvent.target.dispatchEvent(nativeEventClone);\n resetReplayingEvent();\n } else {\n // We're still blocked. Try again later.\n var fiber = getInstanceFromNode(nextBlockedOn);\n\n if (fiber !== null) {\n attemptContinuousHydration(fiber);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // Replay any continuous events.\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n} // [form, submitter or action, formData...]\n\nfunction retryIfBlockedOn(unblocked) {\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n var queuedTarget = queuedExplicitHydrationTargets[i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriority(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case ContinuousEventPriority:\n listenerWrapper = dispatchContinuousEvent;\n break;\n\n case DefaultEventPriority:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(DiscreteEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(ContinuousEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var blockedOn = findInstanceBlockingEvent(nativeEvent);\n\n if (blockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n clearIfContinuousEvent(domEventName, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n nativeEvent.stopPropagation();\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accumulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n\n if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n while (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n attemptSynchronousHydration(fiber);\n }\n\n var nextBlockedOn = findInstanceBlockingEvent(nativeEvent);\n\n if (nextBlockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n }\n\n if (nextBlockedOn === blockedOn) {\n break;\n }\n\n blockedOn = nextBlockedOn;\n }\n\n if (blockedOn !== null) {\n nativeEvent.stopPropagation();\n }\n\n return;\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n return findInstanceBlockingTarget(nativeEventTarget);\n}\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingTarget(targetNode) {\n // TODO: Warn if _enabled is false.\n return_targetInst = null;\n var targetInst = getClosestInstanceFromNode(targetNode);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n return_targetInst = targetInst; // We're not blocked on anything.\n\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n // Used by SimpleEventPlugin:\n case 'cancel':\n case 'click':\n case 'close':\n case 'contextmenu':\n case 'copy':\n case 'cut':\n case 'auxclick':\n case 'dblclick':\n case 'dragend':\n case 'dragstart':\n case 'drop':\n case 'focusin':\n case 'focusout':\n case 'input':\n case 'invalid':\n case 'keydown':\n case 'keypress':\n case 'keyup':\n case 'mousedown':\n case 'mouseup':\n case 'paste':\n case 'pause':\n case 'play':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointerup':\n case 'ratechange':\n case 'reset':\n case 'resize':\n case 'seeked':\n case 'submit':\n case 'touchcancel':\n case 'touchend':\n case 'touchstart':\n case 'volumechange': // Used by polyfills: (fall through)\n\n case 'change':\n case 'selectionchange':\n case 'textInput':\n case 'compositionstart':\n case 'compositionend':\n case 'compositionupdate': // Only enableCreateEventHandleAPI: (fall through)\n\n case 'beforeblur':\n case 'afterblur': // Not used by React but could be by user code: (fall through)\n\n case 'beforeinput':\n case 'blur':\n case 'fullscreenchange':\n case 'focus':\n case 'hashchange':\n case 'popstate':\n case 'select':\n case 'selectstart':\n return DiscreteEventPriority;\n\n case 'drag':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'scroll':\n case 'toggle':\n case 'touchmove':\n case 'wheel': // Not used by React but could be by user code: (fall through)\n\n case 'mouseenter':\n case 'mouseleave':\n case 'pointerenter':\n case 'pointerleave':\n return ContinuousEventPriority;\n\n case 'message':\n {\n // We might be in the Scheduler callback.\n // Eventually this mechanism will be replaced by a check\n // of the current priority on the native scheduler.\n var schedulerPriority = getCurrentPriorityLevel();\n\n switch (schedulerPriority) {\n case ImmediatePriority:\n return DiscreteEventPriority;\n\n case UserBlockingPriority:\n return ContinuousEventPriority;\n\n case NormalPriority$1:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultEventPriority;\n\n case IdlePriority:\n return IdleEventPriority;\n\n default:\n return DefaultEventPriority;\n }\n }\n\n default:\n return DefaultEventPriority;\n }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n // $FlowFixMe[incompatible-use]\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n // $FlowFixMe[incompatible-use]\n event.data = customData;\n }\n }\n }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n }); // $FlowFixMe[incompatible-use]\n\n event.data = chars;\n }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction registerEvents$2() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst$1, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement$1 = target;\n activeElementInst$1 = targetInst;\n activeElement$1.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement$1) {\n return;\n }\n\n activeElement$1.detachEvent('onpropertychange', handlePropertyChange);\n activeElement$1 = null;\n activeElementInst$1 = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n// $FlowFixMe[missing-local-annot]\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst$1)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst$1);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node, props) {\n if (node.type !== 'number') {\n return;\n }\n\n {\n var isControlled = props.value != null;\n\n if (isControlled) {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n } else ;\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout' && targetInst) {\n // These props aren't necessarily the most current but we warn for changing\n // between controlled and uncontrolled, so it doesn't matter and the previous\n // code was also broken for changes.\n var props = targetInst.memoizedProps;\n handleControlledInputBlur(targetNode, props);\n }\n}\n\nfunction registerEvents$1() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n var tag = to.tag;\n\n if (to !== nearestMounted || tag !== HostComponent && (tag !== HostSingleton) && tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable ft-flow/no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable ft-flow/no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection$1(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement = null;\nvar activeElementInst = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement == null || activeElement !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection(activeElement);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement;\n }\n }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement = targetNode;\n activeElementInst = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement = null;\n activeElementInst = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n var eventName = simpleEventPluginEvents[i];\n var domEventName = eventName.toLowerCase();\n var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n } // Special cases where event names don't match.\n\n\n registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n registerSimpleEvent('dblclick', 'onDoubleClick');\n registerSimpleEvent('focusin', 'onFocus');\n registerSimpleEvent('focusout', 'onBlur');\n registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n // TODO: Fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=968056. Can\n // probably remove.\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n // TODO: Fixed in https://phabricator.services.mozilla.com/D26793. Can\n // probably remove.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\nregisterSimpleEvents();\nregisterEvents$1();\nregisterEvents$2();\nregisterEvents();\nregisterEvents$3();\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't foresee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n {\n if (!nonDelegatedEvents.has(domEventName)) {\n error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n {\n if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var eventSystemFlags = 0;\n\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n // We handle selectionchange separately because it\n // doesn't bubble and needs to be on the document.\n if (domEventName !== 'selectionchange') {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement);\n }\n });\n var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n if (ownerDocument !== null) {\n // The selectionchange event also needs deduplication\n // but it is attached to the document.\n if (!ownerDocument[listeningMarker]) {\n ownerDocument[listeningMarker] = true;\n listenToNativeEvent('selectionchange', false, ownerDocument);\n }\n }\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText || (parentTag === HostHoistable ) || (parentTag === HostSingleton )) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if ((tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton )) && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n } // If we are processing the onBeforeBlur event, then we need to take\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if ((tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton )) && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent && (inst.tag !== HostSingleton));\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if ((tag === HostComponent || (tag === HostHoistable ) || (tag === HostSingleton )) && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\nvar didWarnInvalidHydration = false;\nvar didWarnFormActionType = false;\nvar didWarnFormActionName = false;\nvar didWarnFormActionTarget = false;\nvar didWarnFormActionMethod = false;\nvar canDiffStyleForHydrationWarning;\n\n{\n // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n}\n\nfunction validatePropertiesInDevelopment(type, props) {\n {\n validateProperties$2(type, props);\n validateProperties$1(type, props);\n validateProperties(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n\n if (props.contentEditable && !props.suppressContentEditableWarning && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n}\n\nfunction validateFormActionInDevelopment(tag, key, value, props) {\n {\n if (value == null) {\n return;\n }\n\n if (tag === 'form') {\n if (key === 'formAction') {\n error('You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>.');\n } else if (typeof value === 'function') {\n if ((props.encType != null || props.method != null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a encType or method for a form that specifies a ' + 'function as the action. React provides those automatically. ' + 'They will get overridden.');\n }\n\n if (props.target != null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a target for a form that specifies a function as the action. ' + 'The function will always be executed in the same window.');\n }\n }\n } else if (tag === 'input' || tag === 'button') {\n if (key === 'action') {\n error('You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>.');\n } else if (tag === 'input' && props.type !== 'submit' && props.type !== 'image' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('An input can only specify a formAction along with type=\"submit\" or type=\"image\".');\n } else if (tag === 'button' && props.type != null && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('A button can only specify a formAction along with type=\"submit\" or no type.');\n } else if (typeof value === 'function') {\n // Function form actions cannot control the form properties\n if (props.name != null && !didWarnFormActionName) {\n didWarnFormActionName = true;\n\n error('Cannot specify a \"name\" prop for a button that specifies a function as a formAction. ' + 'React needs it to encode which action should be invoked. It will get overridden.');\n }\n\n if ((props.formEncType != null || props.formMethod != null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a formEncType or formMethod for a button that specifies a ' + 'function as a formAction. React provides those automatically. They will get overridden.');\n }\n\n if (props.formTarget != null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a formTarget for a button that specifies a function as a formAction. ' + 'The function will always be executed in the same window.');\n }\n }\n } else {\n if (key === 'action') {\n error('You can only pass the action prop to <form>.');\n } else {\n error('You can only pass the formAction prop to <input> or <button>.');\n }\n }\n }\n}\n\nfunction warnForPropDifference(propName, serverValue, clientValue) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n if (serverValue === clientValue) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n }\n}\n\nfunction warnForExtraAttributes(attributeNames) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n }\n}\n\nfunction warnForInvalidEventListener(registrationName, listener) {\n {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }\n} // Parse the HTML and read it back to normalize the HTML string so that it\n// can be used for comparison.\n\n\nfunction normalizeHTML(parent, html) {\n {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName) : parent.ownerDocument.createElement(parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n }\n} // HTML parsing normalizes CR and CRLF to LF.\n// It also can turn \\u0000 into \\uFFFD inside attributes.\n// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n// If we have a mismatch, it might be caused by that.\n// We will still patch up in this case but not fire the warning.\n\n\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n {\n checkHtmlStringCoercion(markup);\n }\n\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n if (shouldWarnDev) {\n {\n if (!didWarnInvalidHydration) {\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n }\n }\n }\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent roots, we throw when there's a text mismatch and revert to\n // client rendering, up to the nearest Suspense boundary.\n throw new Error('Text content does not match server-rendered HTML.');\n }\n}\n\nfunction noop$1() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop$1;\n}\nvar xlinkNamespace = 'http://www.w3.org/1999/xlink';\nvar xmlNamespace = 'http://www.w3.org/XML/1998/namespace';\n\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case 'children':\n {\n if (typeof value === 'string') {\n {\n validateTextNesting(value, tag);\n } // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n\n\n var canSetTextContent = (tag !== 'body') && (tag !== 'textarea' || value !== '');\n\n if (canSetTextContent) {\n setTextContent(domElement, value);\n }\n } else if (typeof value === 'number') {\n {\n validateTextNesting('' + value, tag);\n }\n\n var _canSetTextContent = tag !== 'body';\n\n if (_canSetTextContent) {\n setTextContent(domElement, '' + value);\n }\n }\n\n break;\n }\n // These are very common props and therefore are in the beginning of the switch.\n // TODO: aria-label is a very common prop but allows booleans so is not like the others\n // but should ideally go in this list too.\n\n case 'className':\n setValueForKnownAttribute(domElement, 'class', value);\n break;\n\n case 'tabIndex':\n // This has to be case sensitive in SVG.\n setValueForKnownAttribute(domElement, 'tabindex', value);\n break;\n\n case 'dir':\n case 'role':\n case 'viewBox':\n case 'width':\n case 'height':\n {\n setValueForKnownAttribute(domElement, key, value);\n break;\n }\n\n case 'style':\n {\n setValueForStyles(domElement, value);\n break;\n }\n // These attributes accept URLs. These must not allow javascript: URLS.\n\n case 'src':\n case 'href':\n {\n\n if (value == null || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n domElement.removeAttribute(key);\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n domElement.setAttribute(key, sanitizedValue);\n break;\n }\n\n case 'action':\n case 'formAction':\n {\n // TODO: Consider moving these special cases to the form, input and button tags.\n {\n validateFormActionInDevelopment(tag, key, value, props);\n }\n\n if (value == null || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n domElement.removeAttribute(key);\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var _sanitizedValue = sanitizeURL('' + value);\n\n domElement.setAttribute(key, _sanitizedValue);\n break;\n }\n\n case 'onClick':\n {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n case 'onScroll':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (value != null) {\n if (typeof value !== 'object' || !('__html' in value)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var nextHtml = value.__html;\n\n if (nextHtml != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n {\n setInnerHTML$1(domElement, nextHtml);\n }\n }\n }\n\n break;\n }\n // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n\n case 'multiple':\n {\n domElement.multiple = value && typeof value !== 'function' && typeof value !== 'symbol';\n break;\n }\n\n case 'muted':\n {\n domElement.muted = value && typeof value !== 'function' && typeof value !== 'symbol';\n break;\n }\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n {\n // Noop\n break;\n }\n\n case 'autoFocus':\n {\n // We polyfill it separately on the client during commit.\n // We could have excluded it in the property list instead of\n // adding a special case here, but then it wouldn't be emitted\n // on server rendering (but we *do* want to emit it in SSR).\n break;\n }\n\n case 'xlinkHref':\n {\n if (value == null || typeof value === 'function' || typeof value === 'boolean' || typeof value === 'symbol') {\n domElement.removeAttribute('xlink:href');\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var _sanitizedValue2 = sanitizeURL('' + value);\n\n domElement.setAttributeNS(xlinkNamespace, 'xlink:href', _sanitizedValue2);\n break;\n }\n\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Booleanish String\n // These are \"enumerated\" attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n // The SVG attributes are case-sensitive. Since the HTML attributes are\n // insensitive they also work even though we canonically use lower case.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol') {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, '' + value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n // Boolean\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n domElement.setAttribute(key, '');\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n // Overloaded Boolean\n\n case 'capture':\n case 'download':\n {\n // An attribute that can be used as a flag as well as with a value.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n // For any other value, should be present with that value.\n if (value === true) {\n domElement.setAttribute(key, '');\n } else if (value !== false && value != null && typeof value !== 'function' && typeof value !== 'symbol') {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n // These are HTML attributes that must be positive numbers.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value) && value >= 1) {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'rowSpan':\n case 'start':\n {\n // These are HTML attributes that must be numbers.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value)) {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'xlinkActuate':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:actuate', value);\n break;\n\n case 'xlinkArcrole':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:arcrole', value);\n break;\n\n case 'xlinkRole':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:role', value);\n break;\n\n case 'xlinkShow':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:show', value);\n break;\n\n case 'xlinkTitle':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:title', value);\n break;\n\n case 'xlinkType':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:type', value);\n break;\n\n case 'xmlBase':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:base', value);\n break;\n\n case 'xmlLang':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:lang', value);\n break;\n\n case 'xmlSpace':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:space', value);\n break;\n // Properties that should not be allowed on custom elements.\n\n case 'is':\n {\n {\n if (prevValue != null) {\n error('Cannot update the \"is\" prop after it has been initialized.');\n }\n } // TODO: We shouldn't actually set this attribute, because we've already\n // passed it to createElement. We don't also need the attribute.\n // However, our tests currently query for it so it's plausible someone\n // else does too so it's break.\n\n\n setValueForAttribute(domElement, 'is', value);\n break;\n }\n\n case 'innerText':\n case 'textContent':\n\n // Fall through\n\n default:\n {\n if (key.length > 2 && (key[0] === 'o' || key[0] === 'O') && (key[1] === 'n' || key[1] === 'N')) {\n if (registrationNameDependencies.hasOwnProperty(key) && value != null && typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n } else {\n var attributeName = getAttributeAlias(key);\n setValueForAttribute(domElement, attributeName, value);\n }\n }\n }\n}\n\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case 'style':\n {\n setValueForStyles(domElement, value);\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (value != null) {\n if (typeof value !== 'object' || !('__html' in value)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var nextHtml = value.__html;\n\n if (nextHtml != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n {\n setInnerHTML$1(domElement, nextHtml);\n }\n }\n }\n\n break;\n }\n\n case 'children':\n {\n if (typeof value === 'string') {\n setTextContent(domElement, value);\n } else if (typeof value === 'number') {\n setTextContent(domElement, '' + value);\n }\n\n break;\n }\n\n case 'onScroll':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n break;\n }\n\n case 'onClick':\n {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'innerHTML':\n {\n // Noop\n break;\n }\n\n case 'innerText': // Properties\n\n case 'textContent':\n\n // Fall through\n\n default:\n {\n if (registrationNameDependencies.hasOwnProperty(key)) {\n if (value != null && typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n } else {\n {\n if (typeof value === 'boolean') {\n // Special case before the new flag is on\n value = '' + value;\n }\n\n setValueForAttribute(domElement, key, value);\n }\n }\n }\n }\n}\n\nfunction setInitialProperties(domElement, tag, props) {\n {\n validatePropertiesInDevelopment(tag, props);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n case 'a':\n case 'g':\n case 'p':\n case 'li':\n {\n // Fast track the most common tag types\n break;\n }\n\n case 'input':\n {\n {\n checkControlledValueProps('input', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var name = null;\n var type = null;\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'name':\n {\n name = propValue;\n break;\n }\n\n case 'type':\n {\n type = propValue;\n break;\n }\n\n case 'checked':\n {\n checked = propValue;\n break;\n }\n\n case 'defaultChecked':\n {\n defaultChecked = propValue;\n break;\n }\n\n case 'value':\n {\n value = propValue;\n break;\n }\n\n case 'defaultValue':\n {\n defaultValue = propValue;\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (propValue != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n\n default:\n {\n setProp(domElement, tag, propKey, propValue, props, null);\n }\n }\n } // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n\n validateInputProps(domElement, props);\n initInput(domElement, value, defaultValue, checked, defaultChecked, type, name, false);\n track(domElement);\n return;\n }\n\n case 'select':\n {\n {\n checkControlledValueProps('select', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var _value = null;\n var _defaultValue = null;\n var multiple = null;\n\n for (var _propKey in props) {\n if (!props.hasOwnProperty(_propKey)) {\n continue;\n }\n\n var _propValue = props[_propKey];\n\n if (_propValue == null) {\n continue;\n }\n\n switch (_propKey) {\n case 'value':\n {\n _value = _propValue; // This is handled by initSelect below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue = _propValue; // This is handled by initSelect below.\n\n break;\n }\n\n case 'multiple':\n {\n multiple = _propValue; // TODO: We don't actually have to fall through here because we set it\n // in initSelect anyway. We can remove the special case in setProp.\n }\n // Fallthrough\n\n default:\n {\n setProp(domElement, tag, _propKey, _propValue, props, null);\n }\n }\n }\n\n validateSelectProps(domElement, props);\n initSelect(domElement, _value, _defaultValue, multiple);\n return;\n }\n\n case 'textarea':\n {\n {\n checkControlledValueProps('textarea', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var _value2 = null;\n var _defaultValue2 = null;\n var children = null;\n\n for (var _propKey2 in props) {\n if (!props.hasOwnProperty(_propKey2)) {\n continue;\n }\n\n var _propValue2 = props[_propKey2];\n\n if (_propValue2 == null) {\n continue;\n }\n\n switch (_propKey2) {\n case 'value':\n {\n _value2 = _propValue2; // This is handled by initTextarea below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue2 = _propValue2;\n break;\n }\n\n case 'children':\n {\n children = _propValue2; // Handled by initTextarea above.\n\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (_propValue2 != null) {\n // TODO: Do we really need a special error message for this. It's also pretty blunt.\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n }\n\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey2, _propValue2, props, null);\n }\n }\n } // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n\n validateTextareaProps(domElement, props);\n initTextarea(domElement, _value2, _defaultValue2, children);\n track(domElement);\n return;\n }\n\n case 'option':\n {\n validateOptionProps(domElement, props);\n\n for (var _propKey3 in props) {\n if (!props.hasOwnProperty(_propKey3)) {\n continue;\n }\n\n var _propValue3 = props[_propKey3];\n\n if (_propValue3 == null) {\n continue;\n }\n\n switch (_propKey3) {\n case 'selected':\n {\n // TODO: Remove support for selected on option.\n domElement.selected = _propValue3 && typeof _propValue3 !== 'function' && typeof _propValue3 !== 'symbol';\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey3, _propValue3, props, null);\n }\n }\n }\n\n return;\n }\n\n case 'dialog':\n {\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n }\n\n case 'iframe':\n case 'object':\n {\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n }\n\n case 'video':\n case 'audio':\n {\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n }\n\n case 'image':\n {\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n }\n\n case 'details':\n {\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n }\n\n case 'embed':\n case 'source':\n case 'img':\n case 'link':\n {\n // These are void elements that also need delegated events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement); // We fallthrough to the return of the void elements\n }\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'hr':\n case 'keygen':\n case 'meta':\n case 'param':\n case 'track':\n case 'wbr':\n case 'menuitem':\n {\n // Void elements\n for (var _propKey4 in props) {\n if (!props.hasOwnProperty(_propKey4)) {\n continue;\n }\n\n var _propValue4 = props[_propKey4];\n\n if (_propValue4 == null) {\n continue;\n }\n\n switch (_propKey4) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n // TODO: Can we make this a DEV warning to avoid this deny list?\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n // defaultChecked and defaultValue are ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey4, _propValue4, props, null);\n }\n }\n }\n\n return;\n }\n\n default:\n {\n if (isCustomElement(tag)) {\n for (var _propKey5 in props) {\n if (!props.hasOwnProperty(_propKey5)) {\n continue;\n }\n\n var _propValue5 = props[_propKey5];\n\n if (_propValue5 == null) {\n continue;\n }\n\n setPropOnCustomElement(domElement, tag, _propKey5, _propValue5, props);\n }\n\n return;\n }\n }\n }\n\n for (var _propKey6 in props) {\n if (!props.hasOwnProperty(_propKey6)) {\n continue;\n }\n\n var _propValue6 = props[_propKey6];\n\n if (_propValue6 == null) {\n continue;\n }\n\n setProp(domElement, tag, _propKey6, _propValue6, props, null);\n }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastProps, nextProps) {\n {\n validatePropertiesInDevelopment(tag, nextProps);\n }\n\n var updatePayload = null;\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n switch (propKey) {\n case 'style':\n {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n\n break;\n }\n\n default:\n {\n // For all other deleted properties we add it to the queue. We use\n // the allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (nextProps.hasOwnProperty(propKey) && nextProp !== lastProp && (nextProp != null || lastProp != null)) {\n switch (propKey) {\n case 'style':\n {\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n\n break;\n }\n\n case 'is':\n {\n error('Cannot update the \"is\" prop after it has been initialized.');\n }\n\n // Fall through\n\n default:\n {\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(lastProps.style, nextProps.style);\n }\n\n (updatePayload = updatePayload || []).push('style', styleUpdates);\n }\n\n return updatePayload;\n}\n\nfunction updatePropertiesWithDiff(domElement, updatePayload, tag, lastProps, nextProps) {\n switch (tag) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n case 'a':\n case 'g':\n case 'p':\n case 'li':\n {\n // Fast track the most common tag types\n break;\n }\n\n case 'input':\n {\n var name = nextProps.name;\n var type = nextProps.type;\n var value = nextProps.value;\n var defaultValue = nextProps.defaultValue;\n var lastDefaultValue = lastProps.defaultValue;\n var checked = nextProps.checked;\n var defaultChecked = nextProps.defaultChecked;\n\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n switch (propKey) {\n case 'type':\n {\n break;\n }\n\n case 'name':\n {\n break;\n }\n\n case 'checked':\n {\n break;\n }\n\n case 'defaultChecked':\n {\n break;\n }\n\n case 'value':\n {\n break;\n }\n\n case 'defaultValue':\n {\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (propValue != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n\n default:\n {\n setProp(domElement, tag, propKey, propValue, nextProps, lastProps[propKey]);\n }\n }\n }\n\n {\n var wasControlled = lastProps.type === 'checkbox' || lastProps.type === 'radio' ? lastProps.checked != null : lastProps.value != null;\n var isControlled = nextProps.type === 'checkbox' || nextProps.type === 'radio' ? nextProps.checked != null : nextProps.value != null;\n\n if (!wasControlled && isControlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (wasControlled && !isControlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n didWarnControlledToUncontrolled = true;\n }\n } // Update the wrapper around inputs *after* updating props. This has to\n // happen after updating the rest of props. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n\n\n updateInput(domElement, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name);\n return;\n }\n\n case 'select':\n {\n var _value5 = nextProps.value;\n var _defaultValue5 = nextProps.defaultValue;\n var multiple = nextProps.multiple;\n var wasMultiple = lastProps.multiple;\n\n for (var _i = 0; _i < updatePayload.length; _i += 2) {\n var _propKey20 = updatePayload[_i];\n var _propValue7 = updatePayload[_i + 1];\n\n switch (_propKey20) {\n case 'value':\n {\n // This is handled by updateWrapper below.\n break;\n }\n // defaultValue are ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey20, _propValue7, nextProps, lastProps[_propKey20]);\n }\n }\n } // <select> value update needs to occur after <option> children\n // reconciliation\n\n\n updateSelect(domElement, _value5, _defaultValue5, multiple, wasMultiple);\n return;\n }\n\n case 'textarea':\n {\n var _value6 = nextProps.value;\n var _defaultValue6 = nextProps.defaultValue;\n\n for (var _i2 = 0; _i2 < updatePayload.length; _i2 += 2) {\n var _propKey21 = updatePayload[_i2];\n var _propValue8 = updatePayload[_i2 + 1];\n\n switch (_propKey21) {\n case 'value':\n {\n // This is handled by updateWrapper below.\n break;\n }\n\n case 'children':\n {\n // TODO: This doesn't actually do anything if it updates.\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (_propValue8 != null) {\n // TODO: Do we really need a special error message for this. It's also pretty blunt.\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n }\n\n break;\n }\n // defaultValue is ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey21, _propValue8, nextProps, lastProps[_propKey21]);\n }\n }\n }\n\n updateTextarea(domElement, _value6, _defaultValue6);\n return;\n }\n\n case 'option':\n {\n for (var _i3 = 0; _i3 < updatePayload.length; _i3 += 2) {\n var _propKey22 = updatePayload[_i3];\n var _propValue9 = updatePayload[_i3 + 1];\n\n switch (_propKey22) {\n case 'selected':\n {\n // TODO: Remove support for selected on option.\n domElement.selected = _propValue9 && typeof _propValue9 !== 'function' && typeof _propValue9 !== 'symbol';\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey22, _propValue9, nextProps, lastProps[_propKey22]);\n }\n }\n }\n\n return;\n }\n\n case 'img':\n case 'link':\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'keygen':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n case 'menuitem':\n {\n // Void elements\n for (var _i4 = 0; _i4 < updatePayload.length; _i4 += 2) {\n var _propKey23 = updatePayload[_i4];\n var _propValue10 = updatePayload[_i4 + 1];\n\n switch (_propKey23) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (_propValue10 != null) {\n // TODO: Can we make this a DEV warning to avoid this deny list?\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n // defaultChecked and defaultValue are ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey23, _propValue10, nextProps, lastProps[_propKey23]);\n }\n }\n }\n\n return;\n }\n\n default:\n {\n if (isCustomElement(tag)) {\n for (var _i5 = 0; _i5 < updatePayload.length; _i5 += 2) {\n var _propKey24 = updatePayload[_i5];\n var _propValue11 = updatePayload[_i5 + 1];\n setPropOnCustomElement(domElement, tag, _propKey24, _propValue11, nextProps);\n }\n\n return;\n }\n }\n } // Apply the diff.\n\n\n for (var _i6 = 0; _i6 < updatePayload.length; _i6 += 2) {\n var _propKey25 = updatePayload[_i6];\n var _propValue12 = updatePayload[_i6 + 1];\n setProp(domElement, tag, _propKey25, _propValue12, nextProps, lastProps[_propKey25]);\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedStyles(domElement, value) {\n if (value != null && typeof value !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(value);\n var serverValue = domElement.getAttribute('style');\n warnForPropDifference('style', serverValue, expectedStyle);\n }\n}\n\nfunction hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n if (!value) {\n return;\n }\n } else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n default:\n {\n if (value) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n // As long as it's positive.\n return;\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateOverloadedBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n return;\n\n default:\n if (value === false) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n case 'boolean':\n if (value === true && serverValue === '') {\n return;\n }\n\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n\n default:\n if (isNaN(value)) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n if (isNaN(value)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n break;\n }\n\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydratePositiveNumericAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n\n default:\n if (isNaN(value) || value < 1) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n if (isNaN(value) || value < 1) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n break;\n }\n\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n\n if (serverValue === sanitizedValue) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction diffHydratedCustomComponent(domElement, tag, props, hostContext, extraAttributes) {\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var value = props[propKey];\n\n if (value == null) {\n continue;\n }\n\n if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(propKey, value);\n }\n\n continue;\n }\n\n if (props.suppressHydrationWarning === true) {\n // Don't bother comparing. We're ignoring all these warnings.\n continue;\n } // Validate that the properties correspond to their expected values.\n\n\n switch (propKey) {\n case 'children': // Checked above already\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue':\n case 'defaultChecked':\n case 'innerHTML':\n // Noop\n continue;\n\n case 'dangerouslySetInnerHTML':\n var serverHTML = domElement.innerHTML;\n var nextHtml = value ? value.__html : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n\n continue;\n\n case 'style':\n extraAttributes.delete(propKey);\n diffHydratedStyles(domElement, value);\n continue;\n\n case 'offsetParent':\n case 'offsetTop':\n case 'offsetLeft':\n case 'offsetWidth':\n case 'offsetHeight':\n case 'isContentEditable':\n case 'outerText':\n case 'outerHTML':\n\n // Fall through\n\n case 'className':\n\n // Fall through\n\n default:\n {\n // This is a DEV-only path\n var hostContextDev = hostContext;\n var hostContextProd = hostContextDev.context;\n\n if (hostContextProd === HostContextNamespaceNone && tag !== 'svg' && tag !== 'math') {\n extraAttributes.delete(propKey.toLowerCase());\n } else {\n extraAttributes.delete(propKey);\n }\n\n var _serverValue = getValueForAttributeOnCustomComponent(domElement, propKey, value);\n\n warnForPropDifference(propKey, _serverValue, value);\n }\n }\n }\n} // This is the exact URL string we expect that Fizz renders if we provide a function action.\n\nfunction diffHydratedGenericElement(domElement, tag, props, hostContext, extraAttributes) {\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var value = props[propKey];\n\n if (value == null) {\n continue;\n }\n\n if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(propKey, value);\n }\n\n continue;\n }\n\n if (props.suppressHydrationWarning === true) {\n // Don't bother comparing. We're ignoring all these warnings.\n continue;\n } // Validate that the properties correspond to their expected values.\n\n\n switch (propKey) {\n case 'children': // Checked above already\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'value': // Controlled attributes are not validated\n\n case 'checked': // TODO: Only ignore them on controlled tags.\n\n case 'selected':\n case 'defaultValue':\n case 'defaultChecked':\n case 'innerHTML':\n // Noop\n continue;\n\n case 'dangerouslySetInnerHTML':\n var serverHTML = domElement.innerHTML;\n var nextHtml = value ? value.__html : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n\n continue;\n\n case 'className':\n hydrateAttribute(domElement, propKey, 'class', value, extraAttributes);\n continue;\n\n case 'tabIndex':\n hydrateAttribute(domElement, propKey, 'tabindex', value, extraAttributes);\n continue;\n\n case 'style':\n extraAttributes.delete(propKey);\n diffHydratedStyles(domElement, value);\n continue;\n\n case 'multiple':\n {\n extraAttributes.delete(propKey);\n var serverValue = domElement.multiple;\n warnForPropDifference(propKey, serverValue, value);\n continue;\n }\n\n case 'muted':\n {\n extraAttributes.delete(propKey);\n var _serverValue2 = domElement.muted;\n warnForPropDifference(propKey, _serverValue2, value);\n continue;\n }\n\n case 'autoFocus':\n {\n extraAttributes.delete('autofocus');\n var _serverValue3 = domElement.autofocus;\n warnForPropDifference(propKey, _serverValue3, value);\n continue;\n }\n\n case 'src':\n case 'href':\n\n hydrateSanitizedAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n\n case 'action':\n case 'formAction':\n\n hydrateSanitizedAttribute(domElement, propKey, propKey.toLowerCase(), value, extraAttributes);\n continue;\n\n case 'xlinkHref':\n hydrateSanitizedAttribute(domElement, propKey, 'xlink:href', value, extraAttributes);\n continue;\n\n case 'contentEditable':\n {\n // Lower-case Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, 'contenteditable', value, extraAttributes);\n continue;\n }\n\n case 'spellCheck':\n {\n // Lower-case Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, 'spellcheck', value, extraAttributes);\n continue;\n }\n\n case 'draggable':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Case-sensitive Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n // Some of these need to be lower case to remove them from the extraAttributes list.\n hydrateBooleanAttribute(domElement, propKey, propKey.toLowerCase(), value, extraAttributes);\n continue;\n }\n\n case 'capture':\n case 'download':\n {\n hydrateOverloadedBooleanAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n hydratePositiveNumericAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'rowSpan':\n {\n hydrateNumericAttribute(domElement, propKey, 'rowspan', value, extraAttributes);\n continue;\n }\n\n case 'start':\n {\n hydrateNumericAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'xHeight':\n hydrateAttribute(domElement, propKey, 'x-height', value, extraAttributes);\n continue;\n\n case 'xlinkActuate':\n hydrateAttribute(domElement, propKey, 'xlink:actuate', value, extraAttributes);\n continue;\n\n case 'xlinkArcrole':\n hydrateAttribute(domElement, propKey, 'xlink:arcrole', value, extraAttributes);\n continue;\n\n case 'xlinkRole':\n hydrateAttribute(domElement, propKey, 'xlink:role', value, extraAttributes);\n continue;\n\n case 'xlinkShow':\n hydrateAttribute(domElement, propKey, 'xlink:show', value, extraAttributes);\n continue;\n\n case 'xlinkTitle':\n hydrateAttribute(domElement, propKey, 'xlink:title', value, extraAttributes);\n continue;\n\n case 'xlinkType':\n hydrateAttribute(domElement, propKey, 'xlink:type', value, extraAttributes);\n continue;\n\n case 'xmlBase':\n hydrateAttribute(domElement, propKey, 'xml:base', value, extraAttributes);\n continue;\n\n case 'xmlLang':\n hydrateAttribute(domElement, propKey, 'xml:lang', value, extraAttributes);\n continue;\n\n case 'xmlSpace':\n hydrateAttribute(domElement, propKey, 'xml:space', value, extraAttributes);\n continue;\n\n default:\n {\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n propKey.length > 2 && (propKey[0] === 'o' || propKey[0] === 'O') && (propKey[1] === 'n' || propKey[1] === 'N')) {\n continue;\n }\n\n var attributeName = getAttributeAlias(propKey);\n var isMismatchDueToBadCasing = false; // This is a DEV-only path\n\n var hostContextDev = hostContext;\n var hostContextProd = hostContextDev.context;\n\n if (hostContextProd === HostContextNamespaceNone && tag !== 'svg' && tag !== 'math') {\n extraAttributes.delete(attributeName.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true;\n extraAttributes.delete(standardName);\n }\n\n extraAttributes.delete(attributeName);\n }\n\n var _serverValue5 = getValueForAttribute(domElement, attributeName, value);\n\n if (!isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, _serverValue5, value);\n }\n }\n }\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, props, isConcurrentMode, shouldWarnDev, hostContext) {\n {\n validatePropertiesInDevelopment(tag, props);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n {\n checkControlledValueProps('input', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n validateInputProps(domElement, props); // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n\n initInput(domElement, props.value, props.defaultValue, props.checked, props.defaultChecked, props.type, props.name, true);\n track(domElement);\n break;\n\n case 'option':\n validateOptionProps(domElement, props);\n break;\n\n case 'select':\n {\n checkControlledValueProps('select', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n validateSelectProps(domElement, props);\n break;\n\n case 'textarea':\n {\n checkControlledValueProps('textarea', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n validateTextareaProps(domElement, props);\n initTextarea(domElement, props.value, props.defaultValue, props.children);\n track(domElement);\n break;\n }\n\n var updatePayload = null;\n var children = props.children; // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n\n if (typeof children === 'string' || typeof children === 'number') {\n if (domElement.textContent !== '' + children) {\n if (props.suppressHydrationWarning !== true) {\n checkForUnmatchedText(domElement.textContent, children, isConcurrentMode, shouldWarnDev);\n }\n\n if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) {\n {\n updatePayload = ['children', children];\n }\n }\n }\n }\n\n if (props.onScroll != null) {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n if (props.onClick != null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n if (shouldWarnDev) {\n var extraAttributes = new Set();\n var attributes = domElement.attributes;\n\n for (var _i7 = 0; _i7 < attributes.length; _i7++) {\n var name = attributes[_i7].name.toLowerCase();\n\n switch (name) {\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributes.add(attributes[_i7].name);\n }\n }\n\n if (isCustomElement(tag)) {\n diffHydratedCustomComponent(domElement, tag, props, hostContext, extraAttributes);\n } else {\n diffHydratedGenericElement(domElement, tag, props, hostContext, extraAttributes);\n }\n\n if (extraAttributes.size > 0 && props.suppressHydrationWarning !== true) {\n warnForExtraAttributes(extraAttributes);\n }\n }\n\n return updatePayload;\n}\nfunction diffHydratedText(textNode, text, isConcurrentMode) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledInputState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledTextareaState(domElement, props);\n return;\n\n case 'select':\n restoreControlledSelectState(domElement, props);\n return;\n }\n}\n\nfunction validateLinkPropsForStyleResource(props) {\n {\n // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null)\n var href = props.href,\n onLoad = props.onLoad,\n onError = props.onError,\n disabled = props.disabled;\n var includedProps = [];\n if (onLoad) includedProps.push('`onLoad`');\n if (onError) includedProps.push('`onError`');\n if (disabled != null) includedProps.push('`disabled`');\n var includedPropsPhrase = propNamesListJoin(includedProps, 'and');\n includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props';\n var withArticlePhrase = includedProps.length === 1 ? 'an ' + includedPropsPhrase : 'the ' + includedPropsPhrase;\n\n if (includedProps.length) {\n error('React encountered a <link rel=\"stylesheet\" href=\"%s\" ... /> with a `precedence` prop that' + ' also included %s. The presence of loading and error handlers indicates an intent to manage' + ' the stylesheet loading state from your from your Component code and React will not hoist or' + ' deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet' + ' using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', href, withArticlePhrase, includedPropsPhrase);\n\n return true;\n }\n }\n\n return false;\n}\n\nfunction propNamesListJoin(list, combinator) {\n switch (list.length) {\n case 0:\n return '';\n\n case 1:\n return list[0];\n\n case 2:\n return list[0] + ' ' + combinator + ' ' + list[1];\n\n default:\n return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1];\n }\n}\n\nfunction validatePreinitArguments(href, options) {\n {\n if (!href || typeof href !== 'string') {\n var typeOfArg = getValueDescriptorExpectingObjectForWarning(href);\n\n error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg);\n } else if (typeof options !== 'object' || options === null) {\n var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options);\n\n error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an \"as\" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is \"%s\".', _typeOfArg, href);\n } else {\n var as = options.as;\n\n switch (as) {\n case 'style':\n case 'script':\n {\n break;\n }\n // We have an invalid as type and need to warn\n\n default:\n {\n var typeOfAs = getValueDescriptorExpectingEnumForWarning(as);\n\n error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an \"as\" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are \"style\"' + ' and \"script\". The href for the preinit call where this warning originated is \"%s\".', typeOfAs, href);\n }\n }\n }\n }\n}\nfunction getValueDescriptorExpectingObjectForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\nfunction getValueDescriptorExpectingEnumForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\n\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE = 'style';\nvar HostContextNamespaceNone = 0;\nvar HostContextNamespaceSvg = 1;\nvar HostContextNamespaceMath = 2;\nvar eventsEnabled = null;\nvar selectionInformation = null;\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var context;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n\n if (root) {\n var namespaceURI = root.namespaceURI;\n context = namespaceURI ? getOwnHostContext(namespaceURI) : HostContextNamespaceNone;\n } else {\n context = HostContextNamespaceNone;\n }\n\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n type = container.tagName;\n var _namespaceURI = container.namespaceURI;\n\n if (!_namespaceURI) {\n switch (type) {\n case 'svg':\n context = HostContextNamespaceSvg;\n break;\n\n case 'math':\n context = HostContextNamespaceMath;\n break;\n\n default:\n context = HostContextNamespaceNone;\n break;\n }\n } else {\n var ownContext = getOwnHostContext(_namespaceURI);\n context = getChildHostContextProd(ownContext, type);\n }\n\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfoDev(null, validatedTag);\n return {\n context: context,\n ancestorInfo: ancestorInfo\n };\n }\n}\n\nfunction getOwnHostContext(namespaceURI) {\n switch (namespaceURI) {\n case SVG_NAMESPACE:\n return HostContextNamespaceSvg;\n\n case MATH_NAMESPACE:\n return HostContextNamespaceMath;\n\n default:\n return HostContextNamespaceNone;\n }\n}\n\nfunction getChildHostContextProd(parentNamespace, type) {\n if (parentNamespace === HostContextNamespaceNone) {\n // No (or default) parent namespace: potential entry point.\n switch (type) {\n case 'svg':\n return HostContextNamespaceSvg;\n\n case 'math':\n return HostContextNamespaceMath;\n\n default:\n return HostContextNamespaceNone;\n }\n }\n\n if (parentNamespace === HostContextNamespaceSvg && type === 'foreignObject') {\n // We're leaving SVG.\n return HostContextNamespaceNone;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\nfunction getChildHostContext(parentHostContext, type) {\n {\n var parentHostContextDev = parentHostContext;\n var context = getChildHostContextProd(parentHostContextDev.context, type);\n var ancestorInfo = updatedAncestorInfoDev(parentHostContextDev.ancestorInfo, type);\n return {\n context: context,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n}\nfunction createHoistableInstance(type, props, rootContainerInstance, internalInstanceHandle) {\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n var domElement = ownerDocument.createElement(type);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n setInitialProperties(domElement, type, props);\n markNodeAsHoistable(domElement);\n return domElement;\n}\nvar warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n};\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var hostContextProd;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, hostContextDev.ancestorInfo);\n hostContextProd = hostContextDev.context;\n }\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n var domElement;\n\n switch (hostContextProd) {\n case HostContextNamespaceSvg:\n domElement = ownerDocument.createElementNS(SVG_NAMESPACE, type);\n break;\n\n case HostContextNamespaceMath:\n domElement = ownerDocument.createElementNS(MATH_NAMESPACE, type);\n break;\n\n default:\n switch (type) {\n case 'svg':\n {\n domElement = ownerDocument.createElementNS(SVG_NAMESPACE, type);\n break;\n }\n\n case 'math':\n {\n domElement = ownerDocument.createElementNS(MATH_NAMESPACE, type);\n break;\n }\n\n case 'script':\n {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n break;\n }\n\n case 'select':\n {\n if (typeof props.is === 'string') {\n domElement = ownerDocument.createElement('select', {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement('select');\n }\n\n if (props.multiple) {\n domElement.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n domElement.size = props.size;\n }\n\n break;\n }\n\n default:\n {\n if (typeof props.is === 'string') {\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type);\n }\n\n {\n if (type.indexOf('-') === -1) {\n // We're not SVG/MathML and we don't have a dash, so we're not a custom element\n // Even if you use `is`, these should be of known type and lower case.\n if (type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n\n if ( // $FlowFixMe[method-unbinding]\n Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n }\n }\n\n }\n\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, hostContext) {\n setInitialProperties(domElement, type, props);\n\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n\n case 'img':\n return true;\n\n default:\n return false;\n }\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, hostContext) {\n\n return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n var ancestor = hostContextDev.ancestorInfo.current;\n\n if (ancestor != null) {\n validateTextNesting(text, ancestor.tag);\n }\n }\n\n var textNode = getOwnerDocumentFromRootContainer(rootContainerInstance).createTextNode(text);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\nfunction getCurrentEventPriority() {\n var currentEvent = window.event;\n\n if (currentEvent === undefined) {\n return DefaultEventPriority;\n }\n\n return getEventPriority(currentEvent.type);\n}\nfunction shouldAttemptEagerTransition() {\n return window.event && window.event.type === 'popstate';\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined;\nfunction preparePortalMount(portalInstance) {\n listenToAllSupportedEvents(portalInstance);\n}\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n} // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n if (newProps.autoFocus) {\n domElement.focus();\n }\n\n return;\n\n case 'img':\n {\n if (newProps.src) {\n domElement.src = newProps.src;\n }\n\n return;\n }\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n {\n // Apply the diff to the DOM node.\n updatePropertiesWithDiff(domElement, updatePayload, type, oldProps, newProps);\n } // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n\n\n updateFiberProps(domElement, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\n\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n var node = suspenseInstance; // Delete all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n\n if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n var data = nextNode.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n return;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n depth++;\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = nextNode;\n } while (node); // TODO: Warn, we didn't find the end comment boundary.\n // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n if (container.nodeType === COMMENT_NODE) {\n clearSuspenseBoundary(container.parentNode, suspenseInstance);\n } else if (container.nodeType === ELEMENT_NODE) {\n clearSuspenseBoundary(container, suspenseInstance);\n } else ; // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style; // $FlowFixMe[method-unbinding]\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = display == null || typeof display === 'boolean' ? '' : // The value would've errored already if it wasn't safe.\n // eslint-disable-next-line react-internal/safe-string-coercion\n ('' + display).trim();\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n {\n var nodeType = container.nodeType;\n\n if (nodeType === DOCUMENT_NODE) {\n clearContainerSparingly(container);\n } else if (nodeType === ELEMENT_NODE) {\n switch (container.nodeName) {\n case 'HEAD':\n case 'HTML':\n case 'BODY':\n clearContainerSparingly(container);\n return;\n\n default:\n {\n container.textContent = '';\n }\n }\n }\n }\n}\n\nfunction clearContainerSparingly(container) {\n var node;\n var nextNode = container.firstChild;\n\n if (nextNode && nextNode.nodeType === DOCUMENT_TYPE_NODE) {\n nextNode = nextNode.nextSibling;\n }\n\n while (nextNode) {\n node = nextNode;\n nextNode = nextNode.nextSibling;\n\n switch (node.nodeName) {\n case 'HTML':\n case 'HEAD':\n case 'BODY':\n {\n var element = node;\n clearContainerSparingly(element); // If these singleton instances had previously been rendered with React they\n // may still hold on to references to the previous fiber tree. We detatch them\n // prospectively to reset them to a baseline starting state since we cannot create\n // new instances.\n\n detachDeletedInstance(element);\n continue;\n }\n // Script tags are retained to avoid an edge case bug. Normally scripts will execute if they\n // are ever inserted into the DOM. However when streaming if a script tag is opened but not\n // yet closed some browsers create and insert the script DOM Node but the script cannot execute\n // yet until the closing tag is parsed. If something causes React to call clearContainer while\n // this DOM node is in the document but not yet executable the DOM node will be removed from the\n // document and when the script closing tag comes in the script will not end up running. This seems\n // to happen in Chrome/Firefox but not Safari at the moment though this is not necessarily specified\n // behavior so it could change in future versions of browsers. While leaving all scripts is broader\n // than strictly necessary this is the least amount of additional code to avoid this breaking\n // edge case.\n //\n // Style tags are retained because they may likely come from 3rd party scripts and extensions\n\n case 'SCRIPT':\n case 'STYLE':\n {\n continue;\n }\n // Stylesheet tags are retained because tehy may likely come from 3rd party scripts and extensions\n\n case 'LINK':\n {\n if (node.rel.toLowerCase() === 'stylesheet') {\n continue;\n }\n }\n }\n\n container.removeChild(node);\n }\n\n return;\n} // Making this so we can eventually move all of the instance caching to the commit phase.\nfunction isHydratableText(text) {\n return text !== '';\n}\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n while (instance.nodeType === ELEMENT_NODE) {\n var element = instance;\n var anyProps = props;\n\n if (element.nodeName.toLowerCase() !== type.toLowerCase()) {\n if (!inRootOrSingleton || !enableHostSingletons) {\n // Usually we error for mismatched tags.\n {\n return null;\n }\n } // In root or singleton parents we skip past mismatched instances.\n\n } else if (!inRootOrSingleton || !enableHostSingletons) {\n // Match\n {\n return element;\n }\n } else if (isMarkedHoistable(element)) ; else {\n // We have an Element with the right type.\n // We are going to try to exclude it if we can definitely identify it as a hoisted Node or if\n // we can guess that the node is likely hoisted or was inserted by a 3rd party script or browser extension\n // using high entropy attributes for certain types. This technique will fail for strange insertions like\n // extension prepending <div> in the <body> but that already breaks before and that is an edge case.\n switch (type) {\n // case 'title':\n //We assume all titles are matchable. You should only have one in the Document, at least in a hoistable scope\n // and if you are a HostComponent with type title we must either be in an <svg> context or this title must have an `itemProp` prop.\n case 'meta':\n {\n // The only way to opt out of hoisting meta tags is to give it an itemprop attribute. We assume there will be\n // not 3rd party meta tags that are prepended, accepting the cases where this isn't true because meta tags\n // are usually only functional for SSR so even in a rare case where we did bind to an injected tag the runtime\n // implications are minimal\n if (!element.hasAttribute('itemprop')) {\n // This is a Hoistable\n break;\n }\n\n return element;\n }\n\n case 'link':\n {\n // Links come in many forms and we do expect 3rd parties to inject them into <head> / <body>. We exclude known resources\n // and then use high-entroy attributes like href which are almost always used and almost always unique to filter out unlikely\n // matches.\n var rel = element.getAttribute('rel');\n\n if (rel === 'stylesheet' && element.hasAttribute('data-precedence')) {\n // This is a stylesheet resource\n break;\n } else if (rel !== anyProps.rel || element.getAttribute('href') !== (anyProps.href == null ? null : anyProps.href) || element.getAttribute('crossorigin') !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin) || element.getAttribute('title') !== (anyProps.title == null ? null : anyProps.title)) {\n // rel + href should usually be enough to uniquely identify a link however crossOrigin can vary for rel preconnect\n // and title could vary for rel alternate\n break;\n }\n\n return element;\n }\n\n case 'style':\n {\n // Styles are hard to match correctly. We can exclude known resources but otherwise we accept the fact that a non-hoisted style tags\n // in <head> or <body> are likely never going to be unmounted given their position in the document and the fact they likely hold global styles\n if (element.hasAttribute('data-precedence')) {\n // This is a style resource\n break;\n }\n\n return element;\n }\n\n case 'script':\n {\n // Scripts are a little tricky, we exclude known resources and then similar to links try to use high-entropy attributes\n // to reject poor matches. One challenge with scripts are inline scripts. We don't attempt to check text content which could\n // in theory lead to a hydration error later if a 3rd party injected an inline script before the React rendered nodes.\n // Falling back to client rendering if this happens should be seemless though so we will try this hueristic and revisit later\n // if we learn it is problematic\n var srcAttr = element.getAttribute('src');\n\n if (srcAttr !== (anyProps.src == null ? null : anyProps.src) || element.getAttribute('type') !== (anyProps.type == null ? null : anyProps.type) || element.getAttribute('crossorigin') !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin)) {\n // This script is for a different src/type/crossOrigin. It may be a script resource\n // or it may just be a mistmatch\n if (srcAttr && element.hasAttribute('async') && !element.hasAttribute('itemprop')) {\n // This is an async script resource\n break;\n }\n }\n\n return element;\n }\n\n default:\n {\n // We have excluded the most likely cases of mismatch between hoistable tags, 3rd party script inserted tags,\n // and browser extension inserted tags. While it is possible this is not the right match it is a decent hueristic\n // that should work in the vast majority of cases.\n return element;\n }\n }\n }\n\n var nextInstance = getNextHydratableSibling(element);\n\n if (nextInstance === null) {\n break;\n }\n\n instance = nextInstance;\n } // This is a suspense boundary or Text node or we got the end.\n // Suspense Boundaries are never expected to be injected by 3rd parties. If we see one it should be matched\n // and this is a hydration error.\n // Text Nodes are also not expected to be injected by 3rd parties. This is less of a guarantee for <body>\n // but it seems reasonable and conservative to reject this as a hydration error as well\n\n\n return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n if (text === '') return null;\n\n while (instance.nodeType !== TEXT_NODE) {\n if (!inRootOrSingleton || !enableHostSingletons) {\n return null;\n }\n\n var nextInstance = getNextHydratableSibling(instance);\n\n if (nextInstance === null) {\n return null;\n }\n\n instance = nextInstance;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction canHydrateSuspenseInstance(instance, inRootOrSingleton) {\n while (instance.nodeType !== COMMENT_NODE) {\n if (!inRootOrSingleton || !enableHostSingletons) {\n return null;\n }\n\n var nextInstance = getNextHydratableSibling(instance);\n\n if (nextInstance === null) {\n return null;\n }\n\n instance = nextInstance;\n } // This has now been refined to a suspense node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\nfunction getSuspenseInstanceFallbackErrorDetails(instance) {\n var dataset = instance.nextSibling && instance.nextSibling.dataset;\n var digest, message, stack;\n\n if (dataset) {\n digest = dataset.dgst;\n\n {\n message = dataset.msg;\n stack = dataset.stck;\n }\n }\n\n {\n return {\n message: message,\n digest: digest,\n stack: stack\n };\n }\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n instance._reactRetry = callback;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n\n if (nodeType === COMMENT_NODE) {\n var nodeData = node.data;\n\n if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n break;\n }\n\n if (nodeData === SUSPENSE_END_DATA) {\n return null;\n }\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction getFirstHydratableChildWithinContainer(parentContainer) {\n return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n return getNextHydratable(parentInstance.nextSibling);\n}\nfunction hydrateInstance(instance, type, props, hostContext, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedProperties(instance, type, props, isConcurrentMode, shouldWarnDev, hostContext);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, suspenseInstance);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode, shouldWarnDev) {\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode, shouldWarnDev) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n}\nfunction didNotHydrateInstanceWithinContainer(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n\n if (parentNode !== null) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentNode, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentNode, instance);\n }\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n }\n}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n}\nfunction errorHydratingContainer(parentContainer) {\n {\n // TODO: This gets logged by onRecoverableError, too, so we should be\n // able to remove it.\n error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n }\n} // -------------------\nfunction isHostSingletonType(type) {\n return type === 'html' || type === 'head' || type === 'body';\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {\n {\n var hostContextDev = hostContext;\n\n if (validateDOMNestingDev) {\n validateDOMNesting(type, hostContextDev.ancestorInfo);\n }\n }\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n\n switch (type) {\n case 'html':\n {\n var documentElement = ownerDocument.documentElement;\n\n if (!documentElement) {\n throw new Error('React expected an <html> element (document.documentElement) to exist in the Document but one was' + ' not found. React never removes the documentElement for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return documentElement;\n }\n\n case 'head':\n {\n var head = ownerDocument.head;\n\n if (!head) {\n throw new Error('React expected a <head> element (document.head) to exist in the Document but one was' + ' not found. React never removes the head for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return head;\n }\n\n case 'body':\n {\n var body = ownerDocument.body;\n\n if (!body) {\n throw new Error('React expected a <body> element (document.body) to exist in the Document but one was' + ' not found. React never removes the body for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return body;\n }\n\n default:\n {\n throw new Error('resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.');\n }\n }\n}\nfunction acquireSingletonInstance(type, props, instance, internalInstanceHandle) {\n {\n var currentInstanceHandle = getInstanceFromNode(instance);\n\n if (currentInstanceHandle) {\n var tagName = instance.tagName.toLowerCase();\n\n error('You are mounting a new %s component when a previous one has not first unmounted. It is an' + ' error to render more than one %s component at a time and attributes and children of these' + ' components will likely fail in unpredictable ways. Please only render a single instance of' + ' <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.', tagName, tagName, tagName);\n }\n\n switch (type) {\n case 'html':\n case 'head':\n case 'body':\n {\n break;\n }\n\n default:\n {\n error('acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.');\n }\n }\n }\n\n var attributes = instance.attributes;\n\n while (attributes.length) {\n instance.removeAttributeNode(attributes[0]);\n }\n\n setInitialProperties(instance, type, props);\n precacheFiberNode(internalInstanceHandle, instance);\n updateFiberProps(instance, props);\n}\nfunction releaseSingletonInstance(instance) {\n var attributes = instance.attributes;\n\n while (attributes.length) {\n instance.removeAttributeNode(attributes[0]);\n }\n\n detachDeletedInstance(instance);\n}\nfunction clearSingleton(instance) {\n var element = instance;\n var node = element.firstChild;\n\n while (node) {\n var nextNode = node.nextSibling;\n var nodeName = node.nodeName;\n\n if (isMarkedHoistable(node) || nodeName === 'HEAD' || nodeName === 'BODY' || nodeName === 'SCRIPT' || nodeName === 'STYLE' || nodeName === 'LINK' && node.rel.toLowerCase() === 'stylesheet') ; else {\n element.removeChild(node);\n }\n\n node = nextNode;\n }\n\n return;\n} // -------------------\nvar NotLoaded =\n/* */\n0;\nvar Loaded =\n/* */\n1;\nvar Errored =\n/* */\n2;\nvar Settled =\n/* */\n3;\nvar Inserted =\n/* */\n4;\nfunction prepareToCommitHoistables() {\n tagCaches = null;\n} // global collections of Resources\n\nvar preloadPropsMap = new Map();\nvar preconnectsSet = new Set(); // getRootNode is missing from IE and old jsdom versions\n\nfunction getHoistableRoot(container) {\n // $FlowFixMe[method-unbinding]\n return typeof container.getRootNode === 'function' ?\n /* $FlowFixMe[incompatible-return] Flow types this as returning a `Node`,\n * but it's either a `Document` or `ShadowRoot`. */\n container.getRootNode() : container.ownerDocument;\n}\n\nfunction getCurrentResourceRoot() {\n var currentContainer = getCurrentRootHostContainer();\n return currentContainer ? getHoistableRoot(currentContainer) : null;\n}\n\nfunction getDocumentFromRoot(root) {\n return root.ownerDocument || root;\n} // We want this to be the default dispatcher on ReactDOMSharedInternals but we don't want to mutate\n// internals in Module scope. Instead we export it and Internals will import it. There is already a cycle\n// from Internals -> ReactDOM -> HostConfig -> Internals so this doesn't introduce a new one.\n\n\nvar ReactDOMClientDispatcher = {\n prefetchDNS: prefetchDNS$1,\n preconnect: preconnect$1,\n preload: preload$1,\n preinit: preinit$1\n}; // We expect this to get inlined. It is a function mostly to communicate the special nature of\n// how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling\n// these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped'\n// and so we have to fall back to something universal. Currently we just refer to the global document.\n// This is notable because nowhere else in ReactDOM do we actually reference the global document or window\n// because we may be rendering inside an iframe.\n\nfunction getDocumentForImperativeFloatMethods() {\n return document;\n}\n\nfunction preconnectAs(rel, crossOrigin, href) {\n var ownerDocument = getDocumentForImperativeFloatMethods();\n\n if (typeof href === 'string' && href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n var key = \"link[rel=\\\"\" + rel + \"\\\"][href=\\\"\" + limitedEscapedHref + \"\\\"]\";\n\n if (typeof crossOrigin === 'string') {\n key += \"[crossorigin=\\\"\" + crossOrigin + \"\\\"]\";\n }\n\n if (!preconnectsSet.has(key)) {\n preconnectsSet.add(key);\n var preconnectProps = {\n rel: rel,\n crossOrigin: crossOrigin,\n href: href\n };\n\n if (null === ownerDocument.querySelector(key)) {\n var instance = ownerDocument.createElement('link');\n setInitialProperties(instance, 'link', preconnectProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n }\n}\n\nfunction prefetchDNS$1(href, options) {\n\n {\n if (typeof href !== 'string' || !href) {\n error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));\n } else if (options != null) {\n if (typeof options === 'object' && hasOwnProperty.call(options, 'crossOrigin')) {\n error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));\n } else {\n error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));\n }\n }\n }\n\n preconnectAs('dns-prefetch', null, href);\n}\n\nfunction preconnect$1(href, options) {\n\n {\n if (typeof href !== 'string' || !href) {\n error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));\n } else if (options != null && typeof options !== 'object') {\n error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));\n } else if (options != null && typeof options.crossOrigin !== 'string') {\n error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));\n }\n }\n\n var crossOrigin = options == null || typeof options.crossOrigin !== 'string' ? null : options.crossOrigin === 'use-credentials' ? 'use-credentials' : '';\n preconnectAs('preconnect', crossOrigin, href);\n}\n\nfunction preload$1(href, options) {\n\n {\n // TODO move this to ReactDOMFloat and expose a stricter function interface or possibly\n // typed functions (preloadImage, preloadStyle, ...)\n var encountered = '';\n\n if (typeof href !== 'string' || !href) {\n encountered += \"The `href` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(href) + \".\";\n }\n\n if (options == null || typeof options !== 'object') {\n encountered += \"The `options` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(options) + \".\";\n } else if (typeof options.as !== 'string' || !options.as) {\n encountered += \"The `as` option encountered was \" + getValueDescriptorExpectingObjectForWarning(options.as) + \".\";\n }\n\n if (encountered) {\n error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag. %s', encountered);\n }\n }\n\n var ownerDocument = getDocumentForImperativeFloatMethods();\n\n if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string' && options.as && ownerDocument) {\n var as = options.as;\n var preloadSelector = \"link[rel=\\\"preload\\\"][as=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(as) + \"\\\"]\";\n\n if (as === 'image') {\n var imageSrcSet = options.imageSrcSet,\n imageSizes = options.imageSizes;\n\n if (typeof imageSrcSet === 'string' && imageSrcSet !== '') {\n preloadSelector += \"[imagesrcset=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(imageSrcSet) + \"\\\"]\";\n\n if (typeof imageSizes === 'string') {\n preloadSelector += \"[imagesizes=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(imageSizes) + \"\\\"]\";\n }\n } else {\n preloadSelector += \"[href=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + \"\\\"]\";\n }\n } else {\n preloadSelector += \"[href=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + \"\\\"]\";\n } // Some preloads are keyed under their selector. This happens when the preload is for\n // an arbitrary type. Other preloads are keyed under the resource key they represent a preload for.\n // Here we figure out which key to use to determine if we have a preload already.\n\n\n var key = preloadSelector;\n\n switch (as) {\n case 'style':\n key = getStyleKey(href);\n break;\n\n case 'script':\n key = getScriptKey(href);\n break;\n }\n\n if (!preloadPropsMap.has(key)) {\n var preloadProps = preloadPropsFromPreloadOptions(href, as, options);\n preloadPropsMap.set(key, preloadProps);\n\n if (null === ownerDocument.querySelector(preloadSelector)) {\n if (as === 'style' && ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) {\n // We already have a stylesheet for this key. We don't need to preload it.\n return;\n } else if (as === 'script' && ownerDocument.querySelector(getScriptSelectorFromKey(key))) {\n // We already have a stylesheet for this key. We don't need to preload it.\n return;\n }\n\n var instance = ownerDocument.createElement('link');\n setInitialProperties(instance, 'link', preloadProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n }\n}\n\nfunction preloadPropsFromPreloadOptions(href, as, options) {\n return {\n rel: 'preload',\n as: as,\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: as === 'image' && options.imageSrcSet ? undefined : href,\n crossOrigin: as === 'font' ? '' : options.crossOrigin,\n integrity: options.integrity,\n type: options.type,\n nonce: options.nonce,\n fetchPriority: options.fetchPriority,\n imageSrcSet: options.imageSrcSet,\n imageSizes: options.imageSizes\n };\n}\n\nfunction preinit$1(href, options) {\n\n {\n validatePreinitArguments(href, options);\n }\n\n var ownerDocument = getDocumentForImperativeFloatMethods();\n\n if (typeof href === 'string' && href && typeof options === 'object' && options !== null) {\n var as = options.as;\n\n switch (as) {\n case 'style':\n {\n var styles = getResourcesFromRoot(ownerDocument).hoistableStyles;\n var key = getStyleKey(href);\n var precedence = options.precedence || 'default'; // Check if this resource already exists\n\n var resource = styles.get(key);\n\n if (resource) {\n // We can early return. The resource exists and there is nothing\n // more to do\n return;\n }\n\n var state = {\n loading: NotLoaded,\n preload: null\n }; // Attempt to hydrate instance from DOM\n\n var instance = ownerDocument.querySelector(getStylesheetSelectorFromKey(key));\n\n if (instance) {\n state.loading = Loaded;\n } else {\n // Construct a new instance and insert it\n var stylesheetProps = stylesheetPropsFromPreinitOptions(href, precedence, options);\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n }\n\n var link = instance = ownerDocument.createElement('link');\n markNodeAsHoistable(link);\n setInitialProperties(link, 'link', stylesheetProps);\n link._p = new Promise(function (resolve, reject) {\n link.onload = resolve;\n link.onerror = reject;\n });\n link.addEventListener('load', function () {\n state.loading |= Loaded;\n });\n link.addEventListener('error', function () {\n state.loading |= Errored;\n });\n state.loading |= Inserted;\n insertStylesheet(instance, precedence, ownerDocument);\n } // Construct a Resource and cache it\n\n\n resource = {\n type: 'stylesheet',\n instance: instance,\n count: 1,\n state: state\n };\n styles.set(key, resource);\n return;\n }\n\n case 'script':\n {\n var src = href;\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts;\n\n var _key = getScriptKey(src); // Check if this resource already exists\n\n\n var _resource = scripts.get(_key);\n\n if (_resource) {\n // We can early return. The resource exists and there is nothing\n // more to do\n return;\n } // Attempt to hydrate instance from DOM\n\n\n var _instance = ownerDocument.querySelector(getScriptSelectorFromKey(_key));\n\n if (!_instance) {\n // Construct a new instance and insert it\n var scriptProps = scriptPropsFromPreinitOptions(src, options); // Adopt certain preload props\n\n var _preloadProps = preloadPropsMap.get(_key);\n\n if (_preloadProps) {\n adoptPreloadPropsForScript(scriptProps, _preloadProps);\n }\n\n _instance = ownerDocument.createElement('script');\n markNodeAsHoistable(_instance);\n setInitialProperties(_instance, 'link', scriptProps);\n ownerDocument.head.appendChild(_instance);\n } // Construct a Resource and cache it\n\n\n _resource = {\n type: 'script',\n instance: _instance,\n count: 1,\n state: null\n };\n scripts.set(_key, _resource);\n return;\n }\n }\n }\n}\n\nfunction stylesheetPropsFromPreinitOptions(href, precedence, options) {\n return {\n rel: 'stylesheet',\n href: href,\n 'data-precedence': precedence,\n crossOrigin: options.crossOrigin,\n integrity: options.integrity,\n fetchPriority: options.fetchPriority\n };\n}\n\nfunction scriptPropsFromPreinitOptions(src, options) {\n return {\n src: src,\n async: true,\n crossOrigin: options.crossOrigin,\n integrity: options.integrity,\n nonce: options.nonce,\n fetchPriority: options.fetchPriority\n };\n} // This function is called in begin work and we should always have a currentDocument set\n\n\nfunction getResource(type, currentProps, pendingProps) {\n var resourceRoot = getCurrentResourceRoot();\n\n if (!resourceRoot) {\n throw new Error('\"resourceRoot\" was expected to exist. This is a bug in React.');\n }\n\n switch (type) {\n case 'meta':\n case 'title':\n {\n return null;\n }\n\n case 'style':\n {\n if (typeof pendingProps.precedence === 'string' && typeof pendingProps.href === 'string') {\n var key = getStyleKey(pendingProps.href);\n var styles = getResourcesFromRoot(resourceRoot).hoistableStyles;\n var resource = styles.get(key);\n\n if (!resource) {\n resource = {\n type: 'style',\n instance: null,\n count: 0,\n state: null\n };\n styles.set(key, resource);\n }\n\n return resource;\n }\n\n return {\n type: 'void',\n instance: null,\n count: 0,\n state: null\n };\n }\n\n case 'link':\n {\n if (pendingProps.rel === 'stylesheet' && typeof pendingProps.href === 'string' && typeof pendingProps.precedence === 'string') {\n var qualifiedProps = pendingProps;\n\n var _key2 = getStyleKey(qualifiedProps.href);\n\n var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles;\n\n var _resource2 = _styles.get(_key2);\n\n if (!_resource2) {\n // We asserted this above but Flow can't figure out that the type satisfies\n var ownerDocument = getDocumentFromRoot(resourceRoot);\n _resource2 = {\n type: 'stylesheet',\n instance: null,\n count: 0,\n state: {\n loading: NotLoaded,\n preload: null\n }\n };\n\n _styles.set(_key2, _resource2);\n\n if (!preloadPropsMap.has(_key2)) {\n preloadStylesheet(ownerDocument, _key2, preloadPropsFromStylesheet(qualifiedProps), _resource2.state);\n }\n }\n\n return _resource2;\n }\n\n return null;\n }\n\n case 'script':\n {\n if (typeof pendingProps.src === 'string' && pendingProps.async === true) {\n var scriptProps = pendingProps;\n\n var _key3 = getScriptKey(scriptProps.src);\n\n var scripts = getResourcesFromRoot(resourceRoot).hoistableScripts;\n\n var _resource3 = scripts.get(_key3);\n\n if (!_resource3) {\n _resource3 = {\n type: 'script',\n instance: null,\n count: 0,\n state: null\n };\n scripts.set(_key3, _resource3);\n }\n\n return _resource3;\n }\n\n return {\n type: 'void',\n instance: null,\n count: 0,\n state: null\n };\n }\n\n default:\n {\n throw new Error(\"getResource encountered a type it did not expect: \\\"\" + type + \"\\\". this is a bug in React.\");\n }\n }\n}\n\nfunction styleTagPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-href': rawProps.href,\n 'data-precedence': rawProps.precedence,\n href: null,\n precedence: null\n });\n}\n\nfunction getStyleKey(href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n return \"href=\\\"\" + limitedEscapedHref + \"\\\"\";\n}\n\nfunction getStyleTagSelector(href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n return \"style[data-href~=\\\"\" + limitedEscapedHref + \"\\\"]\";\n}\n\nfunction getStylesheetSelectorFromKey(key) {\n return \"link[rel=\\\"stylesheet\\\"][\" + key + \"]\";\n}\n\nfunction getPreloadStylesheetSelectorFromKey(key) {\n return \"link[rel=\\\"preload\\\"][as=\\\"style\\\"][\" + key + \"]\";\n}\n\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-precedence': rawProps.precedence,\n precedence: null\n });\n}\n\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n preloadPropsMap.set(key, preloadProps);\n\n if (!ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) {\n // There is no matching stylesheet instance in the Document.\n // We will insert a preload now to kick off loading because\n // we expect this stylesheet to commit\n var preloadEl = ownerDocument.querySelector(getPreloadStylesheetSelectorFromKey(key));\n\n if (preloadEl) {\n // If we find a preload already it was SSR'd and we won't have an actual\n // loading state to track. For now we will just assume it is loaded\n state.loading = Loaded;\n } else {\n var instance = ownerDocument.createElement('link');\n state.preload = instance;\n instance.addEventListener('load', function () {\n return state.loading |= Loaded;\n });\n instance.addEventListener('error', function () {\n return state.loading |= Errored;\n });\n setInitialProperties(instance, 'link', preloadProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n}\n\nfunction preloadPropsFromStylesheet(props) {\n return {\n rel: 'preload',\n as: 'style',\n href: props.href,\n crossOrigin: props.crossOrigin,\n integrity: props.integrity,\n media: props.media,\n hrefLang: props.hrefLang,\n referrerPolicy: props.referrerPolicy\n };\n}\n\nfunction getScriptKey(src) {\n var limitedEscapedSrc = escapeSelectorAttributeValueInsideDoubleQuotes(src);\n return \"[src=\\\"\" + limitedEscapedSrc + \"\\\"]\";\n}\n\nfunction getScriptSelectorFromKey(key) {\n return 'script[async]' + key;\n}\n\nfunction acquireResource(hoistableRoot, resource, props) {\n resource.count++;\n\n if (resource.instance === null) {\n switch (resource.type) {\n case 'style':\n {\n var qualifiedProps = props; // Attempt to hydrate instance from DOM\n\n var instance = hoistableRoot.querySelector(getStyleTagSelector(qualifiedProps.href));\n\n if (instance) {\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return instance;\n }\n\n var styleProps = styleTagPropsFromRawProps(props);\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n instance = ownerDocument.createElement('style');\n markNodeAsHoistable(instance);\n setInitialProperties(instance, 'style', styleProps); // TODO: `style` does not have loading state for tracking insertions. I\n // guess because these aren't suspensey? Not sure whether this is a\n // factoring smell.\n // resource.state.loading |= Inserted;\n\n insertStylesheet(instance, qualifiedProps.precedence, hoistableRoot);\n resource.instance = instance;\n return instance;\n }\n\n case 'stylesheet':\n {\n // This typing is enforce by `getResource`. If we change the logic\n // there for what qualifies as a stylesheet resource we need to ensure\n // this cast still makes sense;\n var _qualifiedProps = props;\n var key = getStyleKey(_qualifiedProps.href); // Attempt to hydrate instance from DOM\n\n var _instance2 = hoistableRoot.querySelector(getStylesheetSelectorFromKey(key));\n\n if (_instance2) {\n resource.instance = _instance2;\n markNodeAsHoistable(_instance2);\n return _instance2;\n }\n\n var stylesheetProps = stylesheetPropsFromRawProps(props);\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n } // Construct and insert a new instance\n\n\n var _ownerDocument = getDocumentFromRoot(hoistableRoot);\n\n _instance2 = _ownerDocument.createElement('link');\n markNodeAsHoistable(_instance2);\n var linkInstance = _instance2;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(_instance2, 'link', stylesheetProps);\n resource.state.loading |= Inserted;\n insertStylesheet(_instance2, _qualifiedProps.precedence, hoistableRoot);\n resource.instance = _instance2;\n return _instance2;\n }\n\n case 'script':\n {\n // This typing is enforce by `getResource`. If we change the logic\n // there for what qualifies as a stylesheet resource we need to ensure\n // this cast still makes sense;\n var borrowedScriptProps = props;\n\n var _key4 = getScriptKey(borrowedScriptProps.src); // Attempt to hydrate instance from DOM\n\n\n var _instance3 = hoistableRoot.querySelector(getScriptSelectorFromKey(_key4));\n\n if (_instance3) {\n resource.instance = _instance3;\n markNodeAsHoistable(_instance3);\n return _instance3;\n }\n\n var scriptProps = borrowedScriptProps;\n\n var _preloadProps2 = preloadPropsMap.get(_key4);\n\n if (_preloadProps2) {\n scriptProps = assign({}, borrowedScriptProps);\n adoptPreloadPropsForScript(scriptProps, _preloadProps2);\n } // Construct and insert a new instance\n\n\n var _ownerDocument2 = getDocumentFromRoot(hoistableRoot);\n\n _instance3 = _ownerDocument2.createElement('script');\n markNodeAsHoistable(_instance3);\n setInitialProperties(_instance3, 'link', scriptProps);\n\n _ownerDocument2.head.appendChild(_instance3);\n\n resource.instance = _instance3;\n return _instance3;\n }\n\n case 'void':\n {\n return null;\n }\n\n default:\n {\n throw new Error(\"acquireResource encountered a resource type it did not expect: \\\"\" + resource.type + \"\\\". this is a bug in React.\");\n }\n }\n } else {\n // In the case of stylesheets, they might have already been assigned an\n // instance during `suspendResource`. But that doesn't mean they were\n // inserted, because the commit might have been interrupted. So we need to\n // check now.\n //\n // The other resource types are unaffected because they are not\n // yet suspensey.\n //\n // TODO: This is a bit of a code smell. Consider refactoring how\n // `suspendResource` and `acquireResource` work together. The idea is that\n // `suspendResource` does all the same stuff as `acquireResource` except\n // for the insertion.\n if (resource.type === 'stylesheet' && (resource.state.loading & Inserted) === NotLoaded) {\n var _qualifiedProps2 = props;\n var _instance4 = resource.instance;\n resource.state.loading |= Inserted;\n insertStylesheet(_instance4, _qualifiedProps2.precedence, hoistableRoot);\n }\n }\n\n return resource.instance;\n}\nfunction releaseResource(resource) {\n resource.count--;\n}\n\nfunction insertStylesheet(instance, precedence, root) {\n var nodes = root.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]');\n var last = nodes.length ? nodes[nodes.length - 1] : null;\n var prior = last;\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var nodePrecedence = node.dataset.precedence;\n\n if (nodePrecedence === precedence) {\n prior = node;\n } else if (prior !== last) {\n break;\n }\n }\n\n if (prior) {\n // We get the prior from the document so we know it is in the tree.\n // We also know that links can't be the topmost Node so the parentNode\n // must exist.\n prior.parentNode.insertBefore(instance, prior.nextSibling);\n } else {\n var parent = root.nodeType === DOCUMENT_NODE ? root.head : root;\n parent.insertBefore(instance, parent.firstChild);\n }\n}\n\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n if (stylesheetProps.crossOrigin == null) stylesheetProps.crossOrigin = preloadProps.crossOrigin;\n if (stylesheetProps.referrerPolicy == null) stylesheetProps.referrerPolicy = preloadProps.referrerPolicy;\n if (stylesheetProps.title == null) stylesheetProps.title = preloadProps.title;\n}\n\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n if (scriptProps.crossOrigin == null) scriptProps.crossOrigin = preloadProps.crossOrigin;\n if (scriptProps.referrerPolicy == null) scriptProps.referrerPolicy = preloadProps.referrerPolicy;\n if (scriptProps.integrity == null) scriptProps.referrerPolicy = preloadProps.integrity;\n}\n\nvar tagCaches = null;\nfunction hydrateHoistable(hoistableRoot, type, props, internalInstanceHandle) {\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n var instance = null;\n\n getInstance: switch (type) {\n case 'title':\n {\n instance = ownerDocument.getElementsByTagName('title')[0];\n\n if (!instance || isOwnedInstance(instance) || instance.namespaceURI === SVG_NAMESPACE || instance.hasAttribute('itemprop')) {\n instance = ownerDocument.createElement(type);\n ownerDocument.head.insertBefore(instance, ownerDocument.querySelector('head > title'));\n }\n\n setInitialProperties(instance, type, props);\n precacheFiberNode(internalInstanceHandle, instance);\n markNodeAsHoistable(instance);\n return instance;\n }\n\n case 'link':\n {\n var cache = getHydratableHoistableCache('link', 'href', ownerDocument);\n var key = type + (props.href || '');\n var maybeNodes = cache.get(key);\n\n if (maybeNodes) {\n var nodes = maybeNodes;\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.getAttribute('href') !== (props.href == null ? null : props.href) || node.getAttribute('rel') !== (props.rel == null ? null : props.rel) || node.getAttribute('title') !== (props.title == null ? null : props.title) || node.getAttribute('crossorigin') !== (props.crossOrigin == null ? null : props.crossOrigin)) {\n // mismatch, try the next node;\n continue;\n }\n\n instance = node;\n nodes.splice(i, 1);\n break getInstance;\n }\n }\n\n instance = ownerDocument.createElement(type);\n setInitialProperties(instance, type, props);\n ownerDocument.head.appendChild(instance);\n break;\n }\n\n case 'meta':\n {\n var _cache = getHydratableHoistableCache('meta', 'content', ownerDocument);\n\n var _key5 = type + (props.content || '');\n\n var _maybeNodes = _cache.get(_key5);\n\n if (_maybeNodes) {\n var _nodes = _maybeNodes;\n\n for (var _i = 0; _i < _nodes.length; _i++) {\n var _node = _nodes[_i]; // We coerce content to string because it is the most likely one to\n // use a `toString` capable value. For the rest we just do identity match\n // passing non-strings here is not really valid anyway.\n\n {\n checkAttributeStringCoercion(props.content, 'content');\n }\n\n if (_node.getAttribute('content') !== (props.content == null ? null : '' + props.content) || _node.getAttribute('name') !== (props.name == null ? null : props.name) || _node.getAttribute('property') !== (props.property == null ? null : props.property) || _node.getAttribute('http-equiv') !== (props.httpEquiv == null ? null : props.httpEquiv) || _node.getAttribute('charset') !== (props.charSet == null ? null : props.charSet)) {\n // mismatch, try the next node;\n continue;\n }\n\n instance = _node;\n\n _nodes.splice(_i, 1);\n\n break getInstance;\n }\n }\n\n instance = ownerDocument.createElement(type);\n setInitialProperties(instance, type, props);\n ownerDocument.head.appendChild(instance);\n break;\n }\n\n default:\n throw new Error(\"getNodesForType encountered a type it did not expect: \\\"\" + type + \"\\\". This is a bug in React.\");\n } // This node is a match\n\n\n precacheFiberNode(internalInstanceHandle, instance);\n markNodeAsHoistable(instance);\n return instance;\n}\n\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n var cache;\n var caches;\n\n if (tagCaches === null) {\n cache = new Map();\n caches = tagCaches = new Map();\n caches.set(ownerDocument, cache);\n } else {\n caches = tagCaches;\n var maybeCache = caches.get(ownerDocument);\n\n if (!maybeCache) {\n cache = new Map();\n caches.set(ownerDocument, cache);\n } else {\n cache = maybeCache;\n }\n }\n\n if (cache.has(type)) {\n // We use type as a special key that signals that this cache has been seeded for this type\n return cache;\n } // Mark this cache as seeded for this type\n\n\n cache.set(type, null);\n var nodes = ownerDocument.getElementsByTagName(type);\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (!isOwnedInstance(node) && (type !== 'link' || node.getAttribute('rel') !== 'stylesheet') && node.namespaceURI !== SVG_NAMESPACE) {\n var nodeKey = node.getAttribute(keyAttribute) || '';\n var key = type + nodeKey;\n var existing = cache.get(key);\n\n if (existing) {\n existing.push(node);\n } else {\n cache.set(key, [node]);\n }\n }\n }\n\n return cache;\n}\n\nfunction mountHoistable(hoistableRoot, type, instance) {\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n ownerDocument.head.insertBefore(instance, type === 'title' ? ownerDocument.querySelector('head > title') : null);\n}\nfunction unmountHoistable(instance) {\n instance.parentNode.removeChild(instance);\n}\nfunction isHostHoistableType(type, props, hostContext) {\n var outsideHostContainerContext;\n var hostContextProd;\n\n {\n var hostContextDev = hostContext; // We can only render resources when we are not within the host container context\n\n outsideHostContainerContext = !hostContextDev.ancestorInfo.containerTagInScope;\n hostContextProd = hostContextDev.context;\n } // Global opt out of hoisting for anything in SVG Namespace or anything with an itemProp inside an itemScope\n\n\n if (hostContextProd === HostContextNamespaceSvg || props.itemProp != null) {\n {\n if (outsideHostContainerContext && props.itemProp != null && (type === 'meta' || type === 'title' || type === 'style' || type === 'link' || type === 'script')) {\n error('Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an' + ' `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop.' + ' Otherwise, try moving this tag into the <head> or <body> of the Document.', type, type);\n }\n }\n\n return false;\n }\n\n switch (type) {\n case 'meta':\n case 'title':\n {\n return true;\n }\n\n case 'style':\n {\n if (typeof props.precedence !== 'string' || typeof props.href !== 'string' || props.href === '') {\n {\n if (outsideHostContainerContext) {\n error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key.' + ' React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that' + ' does not conflic with the `href` values used in any other hoisted <style> or <link rel=\"stylesheet\" ...> tags. ' + ' Note that hoisting <style> tags is considered an advanced feature that most will not use directly.' + ' Consider moving the <style> tag to the <head> or consider adding a `precedence=\"default\"` and `href=\"some unique resource identifier\"`, or move the <style>' + ' to the <style> tag.');\n }\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'link':\n {\n if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '' || props.onLoad || props.onError) {\n {\n if (props.rel === 'stylesheet' && typeof props.precedence === 'string') {\n validateLinkPropsForStyleResource(props);\n }\n\n if (outsideHostContainerContext) {\n if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '') {\n error('Cannot render a <link> outside the main document without a `rel` and `href` prop.' + ' Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag');\n } else if (props.onError || props.onLoad) {\n error('Cannot render a <link> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.');\n }\n }\n }\n\n return false;\n }\n\n switch (props.rel) {\n case 'stylesheet':\n {\n var precedence = props.precedence,\n disabled = props.disabled;\n\n {\n if (typeof precedence !== 'string') {\n if (outsideHostContainerContext) {\n error('Cannot render a <link rel=\"stylesheet\" /> outside the main document without knowing its precedence.' + ' Consider adding precedence=\"default\" or moving it into the root <head> tag.');\n }\n }\n }\n\n return typeof precedence === 'string' && disabled == null;\n }\n\n default:\n {\n return true;\n }\n }\n }\n\n case 'script':\n {\n if (props.async !== true || props.onLoad || props.onError || typeof props.src !== 'string' || !props.src) {\n {\n if (outsideHostContainerContext) {\n if (props.async !== true) {\n error('Cannot render a sync or defer <script> outside the main document without knowing its order.' + ' Try adding async=\"\" or moving it into the root <head> tag.');\n } else if (props.onLoad || props.onError) {\n error('Cannot render a <script> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.');\n } else {\n error('Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop.' + ' Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or' + ' somewhere in the <body>.');\n }\n }\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'noscript':\n case 'template':\n {\n {\n if (outsideHostContainerContext) {\n error('Cannot render <%s> outside the main document. Try moving it into the root <head> tag.', type);\n }\n }\n\n return false;\n }\n }\n\n return false;\n}\nfunction mayResourceSuspendCommit(resource) {\n return resource.type === 'stylesheet' && (resource.state.loading & Inserted) === NotLoaded;\n}\nfunction preloadInstance(type, props) {\n // Return true to indicate it's already loaded\n return true;\n}\nfunction preloadResource(resource) {\n if (resource.type === 'stylesheet' && (resource.state.loading & Settled) === NotLoaded) {\n // we have not finished loading the underlying stylesheet yet.\n return false;\n } // Return true to indicate it's already loaded\n\n\n return true;\n}\nvar suspendedState = null; // We use a noop function when we begin suspending because if possible we want the\n// waitfor step to finish synchronously. If it doesn't we'll return a function to\n// provide the actual unsuspend function and that will get completed when the count\n// hits zero or it will get cancelled if the root starts new work.\n\nfunction noop() {}\n\nfunction startSuspendingCommit() {\n suspendedState = {\n stylesheets: null,\n count: 0,\n unsuspend: noop\n };\n}\nfunction suspendResource(hoistableRoot, resource, props) {\n if (suspendedState === null) {\n throw new Error('Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.');\n }\n\n var state = suspendedState;\n\n if (resource.type === 'stylesheet') {\n if (typeof props.media === 'string') {\n // If we don't currently match media we avoid suspending on this resource\n // and let it insert on the mutation path\n if (matchMedia(props.media).matches === false) {\n return;\n }\n }\n\n if (resource.instance === null) {\n var qualifiedProps = props;\n var key = getStyleKey(qualifiedProps.href); // Attempt to hydrate instance from DOM\n\n var instance = hoistableRoot.querySelector(getStylesheetSelectorFromKey(key));\n\n if (instance) {\n // If this instance has a loading state it came from the Fizz runtime.\n // If there is not loading state it is assumed to have been server rendered\n // as part of the preamble and therefore synchronously loaded. It could have\n // errored however which we still do not yet have a means to detect. For now\n // we assume it is loaded.\n var maybeLoadingState = instance._p;\n\n if (maybeLoadingState !== null && typeof maybeLoadingState === 'object' && // $FlowFixMe[method-unbinding]\n typeof maybeLoadingState.then === 'function') {\n var loadingState = maybeLoadingState;\n state.count++;\n var ping = onUnsuspend.bind(state);\n loadingState.then(ping, ping);\n }\n\n resource.state.loading |= Inserted;\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return;\n }\n\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n var stylesheetProps = stylesheetPropsFromRawProps(props);\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n } // Construct and insert a new instance\n\n\n instance = ownerDocument.createElement('link');\n markNodeAsHoistable(instance);\n var linkInstance = instance; // This Promise is a loading state used by the Fizz runtime. We need this incase there is a race\n // between this resource being rendered on the client and being rendered with a late completed boundary.\n\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance, 'link', stylesheetProps);\n resource.instance = instance;\n }\n\n if (state.stylesheets === null) {\n state.stylesheets = new Map();\n }\n\n state.stylesheets.set(resource, hoistableRoot);\n var preloadEl = resource.state.preload;\n\n if (preloadEl && (resource.state.loading & Settled) === NotLoaded) {\n state.count++;\n\n var _ping = onUnsuspend.bind(state);\n\n preloadEl.addEventListener('load', _ping);\n preloadEl.addEventListener('error', _ping);\n }\n }\n}\nfunction waitForCommitToBeReady() {\n if (suspendedState === null) {\n throw new Error('Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.');\n }\n\n var state = suspendedState;\n\n if (state.stylesheets && state.count === 0) {\n // We are not currently blocked but we have not inserted all stylesheets.\n // If this insertion happens and loads or errors synchronously then we can\n // avoid suspending the commit. To do this we check the count again immediately after\n insertSuspendedStylesheets(state, state.stylesheets);\n } // We need to check the count again because the inserted stylesheets may have led to new\n // tasks to wait on.\n\n\n if (state.count > 0) {\n return function (commit) {\n // We almost never want to show content before its styles have loaded. But\n // eventually we will give up and allow unstyled content. So this number is\n // somewhat arbitrary — big enough that you'd only reach it under\n // extreme circumstances.\n // TODO: Figure out what the browser engines do during initial page load and\n // consider aligning our behavior with that.\n var stylesheetTimer = setTimeout(function () {\n if (state.stylesheets) {\n insertSuspendedStylesheets(state, state.stylesheets);\n }\n\n if (state.unsuspend) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n }, 60000); // one minute\n\n state.unsuspend = commit;\n return function () {\n state.unsuspend = null;\n clearTimeout(stylesheetTimer);\n };\n };\n }\n\n return null;\n}\n\nfunction onUnsuspend() {\n this.count--;\n\n if (this.count === 0) {\n if (this.stylesheets) {\n // If we haven't actually inserted the stylesheets yet we need to do so now before starting the commit.\n // The reason we do this after everything else has finished is because we want to have all the stylesheets\n // load synchronously right before mutating. Ideally the new styles will cause a single recalc only on the\n // new tree. When we filled up stylesheets we only inlcuded stylesheets with matching media attributes so we\n // wait for them to load before actually continuing. We expect this to increase the count above zero\n insertSuspendedStylesheets(this, this.stylesheets);\n } else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\n }\n} // This is typecast to non-null because it will always be set before read.\n// it is important that this not be used except when the stack guarantees it exists.\n// Currentlyt his is only during insertSuspendedStylesheet.\n\n\nvar precedencesByRoot = null;\n\nfunction insertSuspendedStylesheets(state, resources) {\n // We need to clear this out so we don't try to reinsert after the stylesheets have loaded\n state.stylesheets = null;\n\n if (state.unsuspend === null) {\n // The suspended commit was cancelled. We don't need to insert any stylesheets.\n return;\n } // Temporarily increment count. we don't want any synchronously loaded stylesheets to try to unsuspend\n // before we finish inserting all stylesheets.\n\n\n state.count++;\n precedencesByRoot = new Map();\n resources.forEach(insertStylesheetIntoRoot, state);\n precedencesByRoot = null; // We can remove our temporary count and if we're still at zero we can unsuspend.\n // If we are in the synchronous phase before deciding if the commit should suspend and this\n // ends up hitting the unsuspend path it will just invoke the noop unsuspend.\n\n onUnsuspend.call(state);\n}\n\nfunction insertStylesheetIntoRoot(root, resource, map) {\n if (resource.state.loading & Inserted) {\n // This resource was inserted by another root committing. we don't need to insert it again\n return;\n }\n\n var last;\n var precedences = precedencesByRoot.get(root);\n\n if (!precedences) {\n precedences = new Map();\n precedencesByRoot.set(root, precedences);\n var nodes = root.querySelectorAll('link[data-precedence],style[data-precedence]');\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.nodeName === 'link' || // We omit style tags with media=\"not all\" because they are not in the right position\n // and will be hoisted by the Fizz runtime imminently.\n node.getAttribute('media') !== 'not all') {\n precedences.set('p' + node.dataset.precedence, node);\n last = node;\n }\n }\n\n if (last) {\n precedences.set('last', last);\n }\n } else {\n last = precedences.get('last');\n } // We only call this after we have constructed an instance so we assume it here\n\n\n var instance = resource.instance; // We will always have a precedence for stylesheet instances\n\n var precedence = instance.getAttribute('data-precedence');\n var prior = precedences.get('p' + precedence) || last;\n\n if (prior === last) {\n precedences.set('last', instance);\n }\n\n precedences.set(precedence, instance);\n this.count++;\n var onComplete = onUnsuspend.bind(this);\n instance.addEventListener('load', onComplete);\n instance.addEventListener('error', onComplete);\n\n if (prior) {\n prior.parentNode.insertBefore(instance, prior.nextSibling);\n } else {\n var parent = root.nodeType === DOCUMENT_NODE ? root.head : root;\n parent.insertBefore(instance, parent.firstChild);\n }\n\n resource.state.loading |= Inserted;\n}\n\nvar Dispatcher$1 = Internals.Dispatcher;\n\nif (typeof document !== 'undefined') {\n // Set the default dispatcher to the client dispatcher\n Dispatcher$1.current = ReactDOMClientDispatcher;\n}\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n}; // $FlowFixMe[missing-this-annot]\n\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n} // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = // $FlowFixMe[missing-this-annot]\nfunction (children) {\n var root = this._internalRoot;\n\n if (root === null) {\n throw new Error('Cannot update an unmounted root.');\n }\n\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n } else if (isValidContainer(arguments[1])) {\n error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n } else if (typeof arguments[1] !== 'undefined') {\n error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n }\n }\n\n updateContainer(children, root, null, null);\n}; // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = // $FlowFixMe[missing-this-annot]\nfunction () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n\n if (root !== null) {\n this._internalRoot = null;\n var container = root.containerInfo;\n\n {\n if (isAlreadyRendering()) {\n error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n }\n }\n\n flushSync$1(function () {\n updateContainer(null, root, null, null);\n });\n unmarkContainerAsRoot(container);\n }\n};\n\nfunction createRoot$1(container, options) {\n if (!isValidContainer(container)) {\n throw new Error('createRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n\n if (options !== null && options !== undefined) {\n {\n if (options.hydrate) {\n warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n } else {\n if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + ' let root = createRoot(domContainer);\\n' + ' root.render(<App />);');\n }\n }\n }\n\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n }\n\n var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container);\n Dispatcher$1.current = ReactDOMClientDispatcher;\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n\n return new ReactDOMRoot(root);\n} // $FlowFixMe[missing-this-annot]\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n if (target) {\n queueExplicitHydrationTarget(target);\n }\n} // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot$1(container, initialChildren, options) {\n if (!isValidContainer(container)) {\n throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n\n {\n if (initialChildren === undefined) {\n error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n }\n } // For now we reuse the whole bag of options since they contain\n // the hydration callbacks.\n\n\n var hydrationCallbacks = options != null ? options : null;\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n\n if (options !== null && options !== undefined) {\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n }\n\n var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container);\n Dispatcher$1.current = ReactDOMClientDispatcher; // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n listenToAllSupportedEvents(container); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n\n return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nfunction warnIfReactDOMContainerInDEV(container) {\n {\n\n if (isContainerMarkedAsRoot(container)) {\n if (container._reactRootContainer) {\n error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n } else {\n error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n }\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n if (isHydrationContainer) {\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n }\n\n var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n container._reactRootContainer = root;\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; // $FlowFixMe[incompatible-call]\n\n listenToAllSupportedEvents(rootContainerElement);\n flushSync$1();\n return root;\n } else {\n // First clear any existing content.\n clearContainer(container);\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(_root);\n\n _originalCallback.call(instance);\n };\n }\n\n var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n\n container._reactRootContainer = _root;\n markContainerAsRoot(_root.current, container);\n\n var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; // $FlowFixMe[incompatible-call]\n\n\n listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n flushSync$1(function () {\n updateContainer(initialChildren, _root, parentComponent, callback);\n });\n return _root;\n }\n}\n\nfunction warnOnInvalidCallback(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback(callback === undefined ? null : callback, 'render');\n }\n\n var maybeRoot = container._reactRootContainer;\n var root;\n\n if (!maybeRoot) {\n // Initial mount\n root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n } else {\n root = maybeRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, root, parentComponent, callback);\n }\n\n return getPublicRootInstance(root);\n}\n\nfunction findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n {\n error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n {\n error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n {\n error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(containerNode)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n if (parentComponent == null || !has(parentComponent)) {\n throw new Error('parentComponent must be a valid React Component');\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n if (!isValidContainerLegacy(container)) {\n throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n flushSync$1(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe[incompatible-type] This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && // $FlowFixMe[prop-missing]\n // $FlowFixMe[incompatible-use]\n !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nvar Dispatcher = Internals.Dispatcher;\nfunction prefetchDNS(href) {\n var passedOptionArg;\n\n {\n if (arguments[1] !== undefined) {\n passedOptionArg = arguments[1];\n }\n }\n\n var dispatcher = Dispatcher.current;\n\n if (dispatcher) {\n {\n if (passedOptionArg !== undefined) {\n // prefetchDNS will warn if you pass reserved options arg. We pass it along in Dev only to\n // elicit the warning. In prod we do not forward since it is not a part of the interface.\n // @TODO move all arg validation into this file. It needs to be universal anyway so may as well lock down the interace here and\n // let the rest of the codebase trust the types\n dispatcher.prefetchDNS(href, passedOptionArg);\n } else {\n dispatcher.prefetchDNS(href);\n }\n }\n } // We don't error because preconnect needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preconnect(href, options) {\n var dispatcher = Dispatcher.current;\n\n if (dispatcher) {\n dispatcher.preconnect(href, options);\n } // We don't error because preconnect needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preload(href, options) {\n var dispatcher = Dispatcher.current;\n\n if (dispatcher) {\n dispatcher.preload(href, options);\n } // We don't error because preload needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preinit(href, options) {\n var dispatcher = Dispatcher.current;\n\n if (dispatcher) {\n dispatcher.preinit(href, options);\n } // We don't error because preinit needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\n\n{\n if (typeof Map !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n }\n}\n\nfunction createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe[incompatible-return] The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal$1(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nfunction createRoot(container, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return createRoot$1(container, options);\n}\n\nfunction hydrateRoot(container, initialChildren, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return hydrateRoot$1(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n// eslint-disable-next-line no-redeclare\n// eslint-disable-next-line no-redeclare\n\n\nfunction flushSync(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n\n return flushSync$1(fn);\n}\n// This is an array for better minification.\n\nInternals.Events = [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1];\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal;\nexports.createRoot = createRoot;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot;\nexports.preconnect = preconnect;\nexports.prefetchDNS = prefetchDNS;\nexports.preinit = preinit;\nexports.preload = preload;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1kb20vY2pzL3JlYWN0LWRvbS5kZXZlbG9wbWVudC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUN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DYXB0dXJlID1cbi8qICAgICAgICAgICAgICAgICAgICovXG4xMjg7XG52YXIgSHlkcmF0aW5nID1cbi8qICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjsgLy8gWW91IGNhbiBjaGFuZ2UgdGhlIHJlc3QgKGFuZCBhZGQgbW9yZSkuXG5cbnZhciBVcGRhdGUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40O1xuLyogU2tpcHBlZCB2YWx1ZTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwYjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEwMDA7ICovXG5cbnZhciBDaGlsZERlbGV0aW9uID1cbi8qICAgICAgICAgICAgICAgICovXG4xNjtcbnZhciBDb250ZW50UmVzZXQgPVxuLyogICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBDYWxsYmFjayA9XG4vKiAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbi8qIFVzZWQgYnkgRGlkQ2FwdHVyZTogICAgICAgICAgICAgICAgICAgICAgICAgICAgMGIwMDAwMDAwMDAwMDAwMDAwMDAwMDEwMDAwMDAwOyAqL1xuXG52YXIgRm9yY2VDbGllbnRSZW5kZXIgPVxuLyogICAgICAgICAgICAqL1xuMjU2O1xudmFyIFJlZiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBTbmFwc2hvdCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICovXG4xMDI0O1xudmFyIFBhc3NpdmUkMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbi8qIFVzZWQgYnkgSHlkcmF0aW5nOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMGIwMDAwMDAwMDAwMDAwMDAxMDAwMDAwMDAwMDAwOyAqL1xuXG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICA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i1sb2dnaW5nICovXG4gICAgfVxuXG4gICAgZGlzYWJsZWREZXB0aCsrO1xuICB9XG59XG5mdW5jdGlvbiByZWVuYWJsZUxvZ3MoKSB7XG4gIHtcbiAgICBkaXNhYmxlZERlcHRoLS07XG5cbiAgICBpZiAoZGlzYWJsZWREZXB0aCA9PT0gMCkge1xuICAgICAgLyogZXNsaW50LWRpc2FibGUgcmVhY3QtaW50ZXJuYWwvbm8tcHJvZHVjdGlvbi1sb2dnaW5nICovXG4gICAgICB2YXIgcHJvcHMgPSB7XG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgd3JpdGFibGU6IHRydWVcbiAgICAgIH07IC8vICRGbG93Rml4TWVbY2Fubm90LXdyaXRlXSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAg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bi8qICAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRIeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgKi9cbjE2O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjMyO1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG44Mzg4NDgwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMjg7XG52YXIgVHJhbnNpdGlvbkxhbmUyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBUcmFuc2l0aW9uTGFuZTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNTEyO1xudmFyIFRyYW5zaXRpb25MYW5lNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMDI0O1xudmFyIFRyYW5zaXRpb25MYW5lNSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIFRyYW5zaXRpb25MYW5lNiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG40MDk2O1xudmFyIFRyYW5zaXRpb25MYW5lNyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG44MTkyO1xudmFyIFRyYW5zaXRpb25MYW5lOCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMzI3Njg7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjY1NTM2O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4xMzEwNzI7XG52YXIgVHJhbnNpdGlvbkxhbmUxMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjI2MjE0NDtcbnZhciBUcmFuc2l0aW9uTGFuZTEzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuNTI0Mjg4O1xudmFyIFRyYW5zaXRpb25MYW5lMTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4xMDQ4NTc2O1xudmFyIFRyYW5zaXRpb25MYW5lMTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yMDk3MTUyO1xudmFyIFRyYW5zaXRpb25MYW5lMTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MzA0O1xudmFyIFJldHJ5TGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjEyNTgyOTEyMDtcbnZhciBSZXRyeUxhbmUxID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuODM4ODYwODtcbnZhciBSZXRyeUxhbmUyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTY3NzcyMTY7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMzNTU0NDMyO1xudmFyIFJldHJ5TGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG42NzEwODg2NDtcbnZhciBTb21lUmV0cnlMYW5lID0gUmV0cnlMYW5lMTtcbnZhciBTZWxlY3RpdmVIeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICovXG4xMzQyMTc3Mjg7XG52YXIgTm9uSWRsZUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjY4NDM1NDU1O1xudmFyIElkbGVIeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgKi9cbjI2ODQzNTQ1NjtcbnZhciBJZGxlTGFuZSA9XG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AgICAgICBjYXNlICdjb250ZW50RWRpdGFibGUnOlxuICAgICAgICAgICAgY2FzZSAnc3BlbGxDaGVjayc6XG4gICAgICAgICAgICBjYXNlICdkcmFnZ2FibGUnOlxuICAgICAgICAgICAgY2FzZSAndmFsdWUnOlxuICAgICAgICAgICAgY2FzZSAnYXV0b1JldmVyc2UnOlxuICAgICAgICAgICAgY2FzZSAnZXh0ZXJuYWxSZXNvdXJjZXNSZXF1aXJlZCc6XG4gICAgICAgICAgICBjYXNlICdmb2N1c2FibGUnOlxuICAgICAgICAgICAgY2FzZSAncHJlc2VydmVBbHBoYSc6XG4gICAgICAgICAgICBjYXNlICdhbGxvd0Z1bGxTY3JlZW4nOlxuICAgICAgICAgICAgY2FzZSAnYXN5bmMnOlxuICAgICAgICAgICAgY2FzZSAnYXV0b1BsYXknOlxuICAgICAgICAgICAgY2FzZSAnY29udHJvbHMnOlxuICAgICAgICAgICAgY2FzZSAnZGVmYXVsdCc6XG4gICAgICAgICAgICBjYXNlICdkZWZlcic6XG4gICAgICAgICAgICBjYXNlICdkaXNhYmxlZCc6XG4gICAgICAgICAgICBjYXNlICdkaXNhYmxlUGljdHVyZUluUGljdHVyZSc6XG4gICAgICAgICAgICBjYXNlICdkaXNhYmxlUmVtb3RlUGxheWJhY2snOlxuICAgICAgICAgICAgY2FzZSAnZm9ybU5vVmFsaWRhdGUnOlxuICAgICAgICAgICAgY2FzZSAnaGlkZGVuJzpcbiAgICAgICAgICAgIGNhc2UgJ2xvb3AnOlxuICAgICAgICAgICAgY2FzZSAnbm9Nb2R1bGUnOlxuICAgICAgICAgICAgY2FzZSAnbm9WYWxpZGF0ZSc6XG4gICAgICAgICAgICBjYXNlICdvcGVuJzpcbiAgICAgICAgICAgIGNhc2UgJ3BsYXlzSW5saW5lJzpcbiAgICAgICAgICAgIGNhc2UgJ3JlYWRPbmx5JzpcbiAgICAgICAgICAgIGNhc2UgJ3JlcXVpcmVkJzpcbiAgICAgICAgICAgIGNhc2UgJ3JldmVyc2VkJzpcbiAgICAgICAgICAgIGNhc2UgJ3Njb3BlZCc6XG4gICAgICAgICAgICBjYXNlICdzZWFtbGVzcyc6XG4gICAgICAgICAgICBjYXNlICdpdGVtU2NvcGUnOlxuICAgICAgICAgICAgY2FzZSAnY2FwdHVyZSc6XG4gICAgICAgICAgICBjYXNlICdkb3dubG9hZCc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvLyBCb29sZWFuIHByb3BlcnRpZXMgY2FuIGFjY2VwdCBib29sZWFuIHZhbHVlc1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJlZml4ID0gbmFtZS50b0xvd2VyQ2FzZSgpLnNsaWNlKDAsIDUpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHByZWZpeCA9PT0gJ2RhdGEtJyB8fCBwcmVmaXggPT09ICdhcmlhLScpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgZXJyb3IoJ1JlY2VpdmVkIGAlc2AgZm9yIGEgbm9uLWJvb2xlYW4gYXR0cmlidXRlIGAlc2AuXFxuXFxuJyArICdJZiB5b3Ugd2FudCB0byB3cml0ZSBpdCB0byB0aGUgRE9NLCBwYXNzIGEgc3RyaW5nIGluc3RlYWQ6ICcgKyAnJXM9XCIlc1wiIG9yICVzPXt2YWx1ZS50b1N0cmluZygpfS4nLCB2YWx1ZSwgbmFtZSwgbmFtZSwgdmFsdWUsIG5hbWUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBlcnJvcignUmVjZWl2ZWQgYCVzYCBmb3IgYSBub24tYm9vbGVhbiBhdHRyaWJ1dGUgYC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kge1xuICAgICAgICAgICAgICBjYXNlICdjaGVja2VkJzpcbiAgICAgICAgICAgICAgY2FzZSAnc2VsZWN0ZWQnOlxuICAgICAgICAgICAgICBjYXNlICdtdWx0aXBsZSc6XG4gICAgICAgICAgICAgIGNhc2UgJ211dGVkJzpcbiAgICAgICAgICAgICAgY2FzZSAnYWxsb3dGdWxsU2NyZWVuJzpcbiAgICAgICAgICAgICAgY2FzZSAnYXN5bmMnOlxuICAgICAgICAgICAgICBjYXNlICdhdXRvUGxheSc6XG4gICAgICAgICAgICAgIGNhc2UgJ2NvbnRyb2xzJzpcbiAgICAgICAgICAgICAgY2FzZSAnZGVmYXVsdCc6XG4gICAgICAgICAgICAgIGNhc2UgJ2RlZmVyJzpcbiAgICAgICAgICAgICAgY2FzZSAnZGlzYWJsZWQnOlxuICAgICAgICAgICAgICBjYXNlICdkaXNhYmxlUGljdHVyZUluUGljdHVyZSc6XG4gICAgICAgICAgICAgIGNhc2UgJ2Rpc2FibGVSZW1vdGVQbGF5YmFjayc6XG4gICAgICAgICAgICAgIGNhc2UgJ2Zvcm1Ob1ZhbGlkYXRlJzpcbiAgICAgICAgICAgICAgY2FzZSAnaGlkZGVuJzpcbiAgICAgICAgICAgICAgY2FzZSAnbG9vcCc6XG4gICAgICAgICAgICAgIGNhc2UgJ25vTW9kdWxlJzpcbiAgICAgICAgICAgICAgY2FzZSAnbm9WYWxpZGF0ZSc6XG4gICAgICAgICAgICAgIGNhc2UgJ29wZW4nOlxuICAgICAgICAgICAgICBjYXNlICdwbGF5c0lubGluZSc6XG4gICAgICAgICAgICAgIGNhc2UgJ3JlYWRPbmx5JzpcbiAgICAgICAgICAgICAgY2FzZSAncmVxdWlyZWQnOlxuICAgICAgICAgICAgICBjYXNlICdyZXZlcnNlZCc6XG4gICAgICAgICAgICAgIGNhc2UgJ3Njb3BlZCc6XG4gICAgICAgICAgICAgIGNhc2UgJ3NlYW1sZXNzJzpcbiAgICAgICAgICAgICAgY2FzZSAnaXRlbVNjb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mluZENoaWxkID0gdHJ1ZTtcbiAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICBhID0gcGFyZW50QjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIF9jaGlsZCA9IF9jaGlsZC5zaWJsaW5nO1xuICAgICAgfVxuXG4gICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAvLyBTZWFyY2ggcGFyZW50IEIncyBjaGlsZCBzZXRcbiAgICAgICAgX2NoaWxkID0gcGFyZW50Qi5jaGlsZDtcblxuICAgICAgICB3aGlsZSAoX2NoaWxkKSB7XG4gICAgICAgICAgaWYgKF9jaGlsZCA9PT0gYSkge1xuICAgICAgICAgICAgZGlkRmluZENoaWxkID0gdHJ1ZTtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgICAgYiA9IHBhcmVudEE7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBiKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYiA9IHBhcmVudEI7XG4gICAgICAgICAgICBhID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jaGlsZCA9IF9jaGlsZC5zaWJsaW5nO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFkaWRGaW5kQ2hpbGQpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0NoaWxkIHdhcyBub3QgZm91bmQgaW4gZWl0aGVyIHBhcmVudCBzZXQuIFRoaXMgaW5kaWNhdGVzIGEgYnVnICcgKyAnaW4gUmVhY3QgcmVsYXRlZCB0byB0aGUgcmV0dXJuIHBvaW50ZXIuIFBsZWFzZSBmaWxlIGFuIGlzc3VlLicpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYg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hbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICB7XG4gICAgaWYgKGRpZFN1c3BlbmRPckVycm9yREVWKSB7XG4gICAgICAvLyBJbnNpZGUgYSBib3VuZGFyeSB0aGF0IGFscmVhZHkgc3VzcGVuZGVkLiBXZSdyZSBjdXJyZW50bHkgcmVuZGVyaW5nIHRoZVxuICAgICAgLy8gc2libGluZ3Mgb2YgYSBzdXNwZW5kZWQgbm9kZS4gVGhlIG1pc21hdGNoIG1heSBiZSBkdWUgdG8gdGhlIG1pc3NpbmdcbiAgICAgIC8vIGRhdGEsIHNvIGl0J3MgcHJvYmFibHkgYSBmYWxzZSBwb3NpdGl2ZS5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZVdpdGhpbkNvbnRhaW5lcihwYXJlbnRDb250YWluZXIsIHR5cGUpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdFNpbmdsZXRvbjpcbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICB2YXIgcGFyZW50UHJvcHMgPSByZXR1cm5GaWJlci5tZW1vaXplZFByb3BzO1xuICAgICAgICAgIHZhciBwYXJlbnRJbnN0YW5jZSA9IHJldHVybkZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgX3R5cGUgPSBmaWJlci50eXBlO1xuICAgICAgICAgICAgICAgIHZhciBfcHJvcHMgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgICAgdmFyIGlzQ29uY3VycmVudE1vZGUgPSAocmV0dXJuRmliZXIubW9kZSAmIENvbmN1cnJlbnRNb2RlKSAhPT0gTm9Nb2RlO1xuICAgICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlSW5zdGFuY2UocGFyZW50VHlwZSwgcGFyZW50UHJvcHMsIHBhcmVudEluc3RhbmNlLCBfdHlwZSwgX3Byb3BzLCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIGlzQ29uY3VycmVudE1vZGUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICA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RjaEh5ZHJhdGVkQ29udGFpbmVyVGV4dEluc3RhbmNlKHBhcmVudENvbnRhaW5lciwgdGV4dEluc3RhbmNlLCB0ZXh0Q29udGVudCwgLy8gVE9ETzogRGVsZXRlIHRoaXMgYXJndW1lbnQgd2hlbiB3ZSByZW1vdmUgdGhlIGxlZ2FjeSByb290IEFQSS5cbiAgICAgICAgICAgIGlzQ29uY3VycmVudE1vZGUsIHNob3VsZFdhcm5JZk1pc21hdGNoRGV2KTtcblxuICAgICAgICAgICAgaWYgKGlzQ29uY3VycmVudE1vZGUgJiYgZW5hYmxlQ2xpZW50UmVuZGVyRmFsbGJhY2tPblRleHRNaXNtYXRjaCkge1xuICAgICAgICAgICAgICAvLyBJbiBjb25jdXJyZW50IG1vZGUgd2UgbmV2ZXIgdXBkYXRlIHRoZSBtaXNtYXRjaGVkIHRleHQsXG4gICAgICAgICAgICAgIC8vIGV2ZW4gaWYgdGhlIGVycm9yIHdhcyBpZ25vcmVkLlxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGFyZW50VHlwZSA9IHJldHVybkZpYmVyLnR5cGU7XG4gICAgICAgICAgICB2YXIgcGFyZW50UHJvcHMgPSByZXR1cm5GaWJlci5tZW1vaXplZFByb3BzO1xuICAgICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICB2YXIgX2lzQ29uY3VycmVudE1vZGUyID0gKHJldHVybkZpYmVyLm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZTtcblxuICAgICAgICAgICAgZGlkTm90TWF0Y2hIeWRyYXRlZFRleHRJbnN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odXBkYXRlLnRhZykge1xuICAgIGNhc2UgUmVwbGFjZVN0YXRlOlxuICAgICAge1xuICAgICAgICB2YXIgcGF5bG9hZCA9IHVwZGF0ZS5wYXlsb2FkO1xuXG4gICAgICAgIGlmICh0eXBlb2YgcGF5bG9hZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKHdvcmtJblByb2dyZXNzLm1vZGUgJiBTdHJpY3RMZWdhY3lNb2RlKSB7XG4gICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKHRydWUpO1xuXG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcGF5bG9hZC5jYWxsKGluc3RhbmNlLCBwcmV2U3RhdGUsIG5leHRQcm9wcyk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgc2V0SXNTdHJpY3RNb2RlRm9yRGV2dG9vbHMoZmFsc2UpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV4aXREaXNhbGxvd2VkQ29udGV4dFJlYWRJbkRFVigpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBuZXh0U3RhdGU7XG4gICAgICAgIH0gLy8gU3RhdGUgb2JqZWN0XG5cblxuICAgICAgICByZXR1cm4gcGF5bG9hZDtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2FwdHVyZVVwZGF0ZTpcbiAgICAgIHtcbiAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgPSB3b3JrSW5Qcm9ncmVzcy5mbGFncyAmIH5TaG91bGRDYXB0dXJlIHwgRGlkQ2FwdHVyZTtcbiAgICAgIH1cbiAgICAvLyBJbnRlbnRpb25hbCBmYWxsdGhyb3VnaFxuXG4gICAgY2FzZSBVcGRhdGVTdGF0ZTpcbiAgICAgIHtcbiAgICAgICAgdmFyIF9wYXlsb2FkID0gdXBkYXRlLnBheWxvYWQ7XG4gICAgICAgIHZhciBwYXJ0aWFsU3RhdGU7XG5cbiAgICAgICAgaWYgKHR5cGVvZiBfcGF5bG9hZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcGFydGlhbFN0YXRlID0gX3BheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKHdvcmtJblByb2dyZXNzLm1vZGUgJiBTdHJpY3RMZWdhY3lNb2RlKSB7XG4gICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKHRydWUpO1xuXG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgX3BheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAg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mdW5jdGlvbiAoZnVsZmlsbGVkVmFsdWUpIHtcbiAgICAgICAgICAgIGlmICh0aGVuYWJsZS5zdGF0dXMgPT09ICdwZW5kaW5nJykge1xuICAgICAgICAgICAgICB2YXIgZnVsZmlsbGVkVGhlbmFibGUgPSB0aGVuYWJsZTtcbiAgICAgICAgICAgICAgZnVsZmlsbGVkVGhlbmFibGUuc3RhdHVzID0gJ2Z1bGZpbGxlZCc7XG4gICAgICAgICAgICAgIGZ1bGZpbGxlZFRoZW5hYmxlLnZhbHVlID0gZnVsZmlsbGVkVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICBpZiAodGhlbmFibGUuc3RhdHVzID09PSAncGVuZGluZycpIHtcbiAgICAgICAgICAgICAgdmFyIHJlamVjdGVkVGhlbmFibGUgPSB0aGVuYWJsZTtcbiAgICAgICAgICAgICAgcmVqZWN0ZWRUaGVuYWJsZS5zdGF0dXMgPSAncmVqZWN0ZWQnO1xuICAgICAgICAgICAgICByZWplY3RlZFRoZW5hYmxlLnJlYXNvbiA9IGVycm9yO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pOyAvLyBDaGVjayBvbmUgbW9yZSB0aW1lIGluIGNhc2UgdGhlIHRoZW5hYmxlIHJlc29sdmVkIHN5bmNocm9ub3VzbHkuXG5cbiAgICAgICAgICBzd2l0Y2ggKHRoZW5hYmxlLnN0YXR1cykge1xuICAgICAgICAgICAgY2FzZSAnZnVsZmlsbGVkJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBmdWxmaWxsZWRUaGVuYWJsZSA9IHRoZW5hYmxlO1xuICAgICAgICAgICAgICAgIHJldHVybiBmdWxmaWxsZWRUaGVuYWJsZS52YWx1ZTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdyZWplY3RlZCc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICA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V4dFxuICAgICAgLy8gbm9kZS5cbiAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB1cGRhdGVUZXh0Tm9kZShyZXR1cm5GaWJlciwgb2xkRmliZXIsICcnICsgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIG5ld0NoaWxkID09PSAnb2JqZWN0JyAmJiBuZXdDaGlsZCAhPT0gbnVsbCkge1xuICAgICAgc3dpdGNoIChuZXdDaGlsZC4kJHR5cGVvZikge1xuICAgICAgICBjYXNlIFJFQUNUX0VMRU1FTlRfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAobmV3Q2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVwZGF0ZUVsZW1lbnQocmV0dXJuRmliZXIsIG9sZEZpYmVyLCBuZXdDaGlsZCwgbGFuZXMpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgUkVBQ1RfUE9SVEFMX1RZUEU6XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKG5ld0NoaWxkLmtleSA9PT0ga2V5KSB7XG4gICAgICAgICAgICAgIHJldHVybiB1cGRhdGVQb3J0YWwocmV0dXJuRmliZXIsIG9sZEZpYmVyLCBuZXdDaGlsZCwgbGFuZXMpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgUkVBQ1RfTEFaWV9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXlsb2FkID0gbmV3Q2hpbGQuX3BheWxvYWQ7XG4gICAgICA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ZCk7XG4gICAgfVxuXG4gICAge1xuICAgICAgaWYgKHR5cGVvZiBuZXdDaGlsZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB3YXJuT25GdW5jdGlvblR5cGUocmV0dXJuRmliZXIpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBudWxsO1xuICB9XG4gIC8qKlxuICAgKiBXYXJucyBpZiB0aGVyZSBpcyBhIGR1cGxpY2F0ZSBvciBtaXNzaW5nIGtleVxuICAgKi9cblxuXG4gIGZ1bmN0aW9uIHdhcm5PbkludmFsaWRLZXkoY2hpbGQsIGtub3duS2V5cywgcmV0dXJuRmliZXIpIHtcbiAgICB7XG4gICAgICBpZiAodHlwZW9mIGNoaWxkICE9PSAnb2JqZWN0JyB8fCBjaGlsZCA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4ga25vd25LZXlzO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKGNoaWxkLiQkdHlwZW9mKSB7XG4gICAgICAgIGNhc2UgUkVBQ1RfRUxFTUVOVF9UWVBFOlxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHdhcm5Gb3JNaXNzaW5nS2V5KGNoaWxkLCByZXR1cm5GaWJlcik7XG4gICAgICAgICAgdmFyIGtleSA9IGNoaWxkLmtleTtcblxuICAgICAgICAgIGlmICh0eXBlb2Yga2V5ICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFrbm93bktleXMuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGtub3duS2V5cy5hZGQoa2V5KTt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c6XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIGZ1bGZpbGxlZFRoZW5hYmxlID0gcmVzdWx0VGhlbmFibGU7XG4gICAgICAgICAgICBmdWxmaWxsZWRUaGVuYWJsZS5zdGF0dXMgPSAnZnVsZmlsbGVkJztcbiAgICAgICAgICAgIGZ1bGZpbGxlZFRoZW5hYmxlLnZhbHVlID0gZmluaXNoZWRTdGF0ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlICdyZWplY3RlZCc6XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIHJlamVjdGVkVGhlbmFibGUgPSByZXN1bHRUaGVuYWJsZTtcbiAgICAgICAgICAgIHJlamVjdGVkVGhlbmFibGUuc3RhdHVzID0gJ3JlamVjdGVkJztcbiAgICAgICAgICAgIHJlamVjdGVkVGhlbmFibGUucmVhc29uID0gcmVqZWN0ZWRSZWFzb247XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAncGVuZGluZyc6XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAge1xuICAgICAgICAgICAgLy8gVGhlIGxpc3RlbmVyIGFib3ZlIHNob3VsZCBoYXZlIGJlZW4gY2FsbGVkIGZpcnN0LCBzbyBgcmVzdWx0U3RhdHVzYFxuICAgICAgICAgICAgLy8gc2hvdWxkIGFscmVhZHkgYmUgc2V0IHRvIHRoZSBjb3JyZWN0IHZhbHVlLlxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdUaGVuYWJsZSBzaG91bGQgaGF2ZSBhbHJlYWR5IHJlc29sdmVkLiBUaGlzICcgKyAnaXMgYSBidWcgaW4gUmVhY3QuJyk7XG4gICAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuICAgIHJldHVybiByZXN1bHRUaGVuYWJsZTtcbiAgfSBlbHNlIHtcbiAgICAvLyBUaGlzIGlzIG5vdCBhbiBhc3luYyBhY3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RE86IFJlZmFjdG9yIHRocm93RXhjZXB0aW9uIHNvIHRoYXQgd2UgZG9uJ3QgaGF2ZSB0byBkbyB0aGlzIHR5cGVcbiAgICAgICAgICAgIC8vIGNoZWNrLiBUaGUgY2FsbGVyIGFscmVhZHkga25vd3Mgd2hhdCB0aGUgY2F1c2Ugd2FzLlxuXG4gICAgICAgICAgICB2YXIgaXNTdXNwZW5zZXlSZXNvdXJjZSA9IHdha2VhYmxlID09PSBub29wU3VzcGVuc2V5Q29tbWl0VGhlbmFibGU7XG5cbiAgICAgICAgICAgIGlmIChpc1N1c3BlbnNleVJlc291cmNlKSB7XG4gICAgICAgICAgICAgIHN1c3BlbnNlQm91bmRhcnkuZmxhZ3MgfD0gU2NoZWR1bGVSZXRyeTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhciByZXRyeVF1ZXVlID0gc3VzcGVuc2VCb3VuZGFyeS51cGRhdGVRdWV1ZTtcblxuICAgICAgICAgICAgICBpZiAocmV0cnlRdWV1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHN1c3BlbnNlQm91bmRhcnkudXBkYXRlUXVldWUgPSBuZXcgU2V0KFt3YWtlYWJsZV0pO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHJ5UXVldWUuYWRkKHdha2VhYmxlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBPZmZzY3JlZW5Db21wb25lbnQ6XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKHN1c3BlbnNlQm91bmRhcnkubW9kZSAmIENvbmN1cnJlbnRNb2RlKSB7XG4gICAgICAgICAgICAgIHN1c3BlbnNlQm91bmRhcnkuZmxhZ3MgfD0gU2hvdWxkQ2FwdHVyZTtcblxuICAgICAgICAgICAgICB2YXIgX2lzU3VzcGVuc2V5UmV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x2ZWRQcm9wcywgcmVuZGVyTGFuZXMpO1xuICAgICAgICByZXR1cm4gY2hpbGQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB7XG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MudHlwZSA9IENvbXBvbmVudCA9IHJlc29sdmVDbGFzc0ZvckhvdFJlbG9hZGluZyhDb21wb25lbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgY2hpbGQgPSB1cGRhdGVDbGFzc0NvbXBvbmVudChudWxsLCB3b3JrSW5Qcm9ncmVzcywgQ29tcG9uZW50LCByZXNvbHZlZFByb3BzLCByZW5kZXJMYW5lcyk7XG4gICAgICAgIHJldHVybiBjaGlsZDtcbiAgICAgIH1cblxuICAgIGNhc2UgRm9yd2FyZFJlZjpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIHdvcmtJblByb2dyZXNzLnR5cGUgPSBDb21wb25lbnQgPSByZXNvbHZlRm9yd2FyZFJlZkZvckhvdFJlbG9hZGluZyhDb21wb25lbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgY2hpbGQgPSB1cGRhdGVGb3J3YXJkUmVmKG51bGwsIHdvcmtJblByb2dyZXNzLCBDb21wb25lbnQsIHJlc29sdmVkUHJvcHMsIHJlbmRlckxhbmVzKTtcbiAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgfVxuXG4gICAgY2FzZSBNZW1vQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB7XG4gICAgICAgICAgaWYgKHdvcmtJblByb2dyZXNzLnR5cGUgIT09IHdvcmtJblByb2dyZXNzLmVsZW1lbnRUeXBlKSB7XG4gICAgICAgICAgICB2YXIgb3V0ZXJQcm9wVHlwZXMgPSBDb21wb25lbnQucHJvcFR5cGVzO1xuXG4gICAgICAgICAgICBpZiAob3V0ZXJQcm9wVHlwZXMpIHtcbiAgICAgICAgICAgICAgY2hlY2tQcm9wVHlwZXM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BiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8gdGFpbFxuICAgICAgICAgIG51bGwsIC8vIGxhc3RcbiAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUaGUgZGVmYXVsdCByZXZlYWwgb3JkZXIgaXMgdGhlIHNhbWUgYXMgbm90IGhhdmluZ1xuICAgICAgICAgIC8vIGEgYm91bmRhcnkuXG4gICAgICAgICAgd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xuICAgICAgICAgICAgdmFyIGN1cnJlbnRSZXNvdXJjZSA9IGN1cnJlbnQubWVtb2l6ZWRTdGF0ZTtcblxuICAgICAgICAgICAgaWYgKG5leHRSZXNvdXJjZSAhPT0gY3VycmVudFJlc291cmNlKSB7XG4gICAgICAgICAgICAgIC8vIFdlIGFyZSB0cmFuc2l0aW9uaW5nIHRvLCBmcm9tLCBvciBiZXR3ZWVuIEhvaXN0YWJsZSBSZXNvdXJjZXNcbiAgICAgICAgICAgICAgLy8gYW5kIHJlcXVpcmUgYW4gdXBkYXRlXG4gICAgICAgICAgICAgIG1hcmtVcGRhdGUod29ya0luUHJvZ3Jlc3MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY3VycmVudC5yZWYgIT09IHdvcmtJblByb2dyZXNzLnJlZikge1xuICAgICAgICAgICAgICBtYXJrUmVmKHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKG5leHRSZXNvdXJjZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgSG9pc3RhYmxlIFJlc291cmNlXG4gICAgICAgICAgICAgIC8vIFRoaXMgbXVzdCBjb21lIGF0IHRoZSB2ZXJ5IGVuZCBvZiB0aGUgY29tcGxldGUgcGhhc2UuXG4gICAgICAgICAgICAgIGJ1YmJsZVByb3BlcnRpZXMod29ya0luUHJvZ3Jlc3MpO1xuXG4gICAgICAgICAgICAgIGlmIChuZXh0UmVzb3VyY2UgPT09IGN1cnJlbnRSZXNvdXJjZSkge1xuICAgICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzICY9IH5NYXlTdXNwZW5kQ29tbWl0O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHByZWxvYWRSZXNvdXJjZUFuZFN1c3BlbmRJZk5lZWRlZCh3b3JrSW5Qcm9ncmVzcywgbmV4dFJlc291cmNlKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgLy8gVGhpcyBpcyBhIEhvaXN0YWJsZSBJbnN0YW5jZVxuICAgICAgICAgICAgICAvLyBXZSBtYXkgaGF2ZSBwcm9wcyB0byB1cGRhdGUgb24gdGhlIEhvaXN0YWJsZSBpbnN0YW5jZS5cbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIFdlIHVzZSB0aGUgdXBkYXRlSG9zdENvbXBvbmVudCBwYXRoIGJlY3Vhc2UgaXQgcHJvZHVjZXNcbiAgICAgICAgICAgICAgICAvLyB0aGUgdXBkYXRlIHF1ZXVlIHdlIG5lZWQgZm9yIEhvaXN0YWJsZXMuXG4gICAgICAgICAgICAgICAgdXBkYXRlSG9zdENvbXBvbmVudChjdXJyZW50LCB3b3JrSW5Qcm9ncmVzcywgdHlwZSwgbmV3UHJvcHMpO1xuICAgICAgICAgICAgICB9IC8vIFRoaXMgbXVzdCBjb21lIGF0IHRoZSB2ZXJ5IGVuZCBvZiB0aGUgY29tcGxldGUgcGhhc2UuXG5cblxuICAgICAgICAgICAgICBidWJibGVQcm9wZXJ0aWVzKHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgICAgICAgcHJlbG9hZEluc3RhbmNlQW5kU3VzcGVuZElmTmVlZGVkKHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIEZhbGwgdGhyb3VnaFxuXG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICB7XG4gICAgICAgIHtcbiAgICAgICAgICBwb3BIb3N0Q29udGV4dCh3b3JrSW5Qcm9ncmVzcyk7XG4gICAgICAgICAgdmFyIHJvb3RDb250YWluZXJJbnN0YW5jZSA9IGdldFJvb3RIb3N0Q29udGFp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ICB0cnkge1xuICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgcmVmQ2xlYW51cCgpO1xuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihjdXJyZW50KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVmQ2xlYW51cCgpO1xuICAgICAgICB9XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihjdXJyZW50LCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBlcnJvcik7XG4gICAgICB9IGZpbmFsbHkge1xuICAgICAgICAvLyBgcmVmQ2xlYW51cGAgaGFzIGJlZW4gY2FsbGVkLiBOdWxsaWZ5IGFsbCByZWZlcmVuY2VzIHRvIGl0IHRvIHByZXZlbnQgZG91YmxlIGludm9jYXRpb24uXG4gICAgICAgIGN1cnJlbnQucmVmQ2xlYW51cCA9IG51bGw7XG4gICAgICAgIHZhciBmaW5pc2hlZFdvcmsgPSBjdXJyZW50LmFsdGVybmF0ZTtcblxuICAgICAgICBpZiAoZmluaXNoZWRXb3JrICE9IG51bGwpIHtcbiAgICAgICAgICBmaW5pc2hlZFdvcmsucmVmQ2xlYW51cCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKHR5cGVvZiByZWYgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIHZhciByZXRWYWw7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChzaG91bGRQcm9maWxlKGN1cnJlbnQpKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgIHJldFZhbCA9IHJlZihudWxsKTtcbiAgICAgICAgICB9IGZpbmFsbHkge1xuIC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4gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RSb290OlxuICAgICAge1xuICAgICAgICBpZiAoKGZsYWdzICYgU25hcHNob3QpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgIGNhc2UgSG9zdEhvaXN0YWJsZTpcbiAgICBjYXNlIEhvc3RTaW5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gICAgIGlmICgoZWZmZWN0LnRhZyAmIGZsYWdzKSA9PT0gZmxhZ3MpIHtcbiAgICAgICAgLy8gVW5tb3VudFxuICAgICAgICB2YXIgaW5zdCA9IGVmZmVjdC5pbnN0O1xuICAgICAgICB2YXIgZGVzdHJveSA9IGluc3QuZGVzdHJveTtcblxuICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaW5zdC5kZXN0cm95ID0gdW5kZWZpbmVkO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIFBhc3NpdmUpICE9PSBOb0ZsYWdzKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYXNzaXZlRWZmZWN0VW5tb3VudFN0YXJ0ZWQoZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncykge1xuICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgSW5zZXJ0aW9uKSAhPT0gTm9GbGFncykge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzKSB7XG4gICAgICAgICAgICAgIHNldElzUnVubmluZ0luc2VydGlvbkVmZmVjdChmYWxzZSk7XG4gICA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gICB9XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmIChkZXN0cm95ICE9PSB1bmRlZmluZWQgJiYgdHlwZW9mIGRlc3Ryb3kgIT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHZhciBob29rTmFtZSA9IHZvaWQgMDtcblxuICAgICAgICAgICAgaWYgKChlZmZlY3QudGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIGhvb2tOYW1lID0gJ3VzZUxheW91dEVmZmVjdCc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKChlZmZlY3QudGFnICYgSW5zZXJ0aW9uKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIGhvb2tOYW1lID0gJ3VzZUluc2VydGlvbkVmZmVjdCc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBob29rTmFtZSA9ICd1c2VFZmZlY3QnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgYWRkZW5kdW0gPSB2b2lkIDA7XG5cbiAgICAgICAgICAgIGlmIChkZXN0cm95ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIGFkZGVuZHVtID0gJyBZb3UgcmV0dXJuZWQgbnVsbC4gSWYgeW91ciBlZmZlY3QgZG9lcyBub3QgcmVxdWlyZSBjbGVhbiAnICsgJ3VwLCByZXR1cm4gdW5kZWZpbmVkIChvciBub3RoaW5nKS4nO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZGVzdHJveS50aGVuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgIGFkZGVuZHVtID0gJ1xcblxcbkl0IGxvb2tzIGxpa2UgeW91IHdyb3RlICcgKyBob29rTmFtZSArICcoYXN5bmMgKCkgPT4gLi4uKSBvciByZXR1cm5lZCBhIFByb21pc2UuICcgKyAnSW5zdGVhZCwgd3JpdGUgdGhlIGFzeW5jIGZ1bmN0aW9uIGluc2lkZSB5b3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iAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGU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gdGltZSBpdCByZWFjaGVzIHRoZVxuICAgICAgICAgIC8vIGNvbW1pdCBwaGFzZS4gQ29uc2lkZXIgcmVtb3ZpbmcgdGhlIHR5cGUgY2hlY2suXG4gICAgICAgICAgdmFyIHVwZGF0ZVF1ZXVlID0gZmluaXNoZWRXb3JrLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgICAgaWYgKHVwZGF0ZVF1ZXVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBudWxsO1xuXG4gICAgICAgICAgICBpZiAoZmluaXNoZWRXb3JrLmNoaWxkICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHN3aXRjaCAoZmluaXNoZWRXb3JrLmNoaWxkLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFNpbmdsZXRvbjpcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBpbnN0YW5jZSA9IGdldFB1YmxpY0luc3RhbmNlKGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGUpO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICAgICAgICAgICAgaW5zdGFuY2UgPSBmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgY29tbWl0Q2FsbGJhY2tzKHVwZGF0ZVF1ZXVlLCBpbnN0YW5jZSk7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAg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RvIHJlY3Vyc2UgZG93biBpdHNcbiAgICAvLyBjaGlsZHJlbiB0byBmaW5kIGFsbCB0aGUgdGVybWluYWwgbm9kZXMuXG4gICAgdmFyIG5vZGUgPSBmaW5pc2hlZFdvcms7XG5cbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgaWYgKG5vZGUudGFnID09PSBIb3N0Q29tcG9uZW50IHx8IChub2RlLnRhZyA9PT0gSG9zdEhvaXN0YWJsZSApIHx8IChub2RlLnRhZyA9PT0gSG9zdFNpbmdsZXRvbiApKSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBub2RlO1xuXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZhciBpbnN0YW5jZSA9IG5vZGUuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZSA9IG5vZGUuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZVRleHRJbnN0YW5jZShfaW5zdGFuY2UpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdW5oaWRlVGV4dEluc3RhbmNlKF9pbnN0YW5jZSwgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgIC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1cm5GaWJlcjtcblxuICAgIGZpbmRQYXJlbnQ6IHdoaWxlIChwYXJlbnQgIT09IG51bGwpIHtcbiAgICAgIHN3aXRjaCAocGFyZW50LnRhZykge1xuICAgICAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZTtcbiAgICAgICAgICAgIGhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IGZhbHNlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrIGZpbmRQYXJlbnQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrIGZpbmRQYXJlbnQ7XG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBwYXJlbnQgPSBwYXJlbnQucmV0dXJuO1xuICAgIH1cblxuICAgIGlmIChob3N0UGFyZW50ID09PSBudWxsKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHRvIGZpbmQgYSBob3N0IHBhcmVudC4gVGhpcyBlcnJvciBpcyBsaWtlbHkgY2F1c2VkIGJ5ICcgKyAnYSBidWcgaW4gUmVhY3QuIFBsZ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HVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIC8vIFdoZW4gd2UgZ28gaW50byBhIHBvcnRhbCwgaXQgYmVjb21lcyB0aGUgcGFyZW50IHRvIHJlbW92ZSBmcm9tLlxuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnQyID0gaG9zdFBhcmVudDtcbiAgICAgICAgICB2YXIgX3ByZXZIb3N0UGFyZW50SXNDb250YWluZXIyID0gaG9zdFBhcmVudElzQ29udGFpbmVyO1xuICAgICAgICAgIGhvc3RQYXJlbnQgPSBkZWxldGVkRmliZXIuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gdHJ1ZTtcbiAgICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICBob3N0UGFyZW50ID0gX3ByZXZIb3N0UGFyZW50MjtcbiAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSBfcHJldkhvc3RQYXJlbnRJc0NvbnRhaW5lcjI7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgIGNhc2UgRm9yd2FyZFJlZjpcbiAgICBjYXNlIE1lbW9Db21wb25lbnQ6XG4gICAgY2FzZSBTaW1wbGVNZW1vQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICBpZiAoIW9mZnNjcmVlblN1YnRyZWVXYXNIaWRkZW4pIHtcbiAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBkZWxldGVkRmliZXIudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAodXBkYXRlUXVldWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBsYXN0RWZmZWN0ID0gdXBkYXRlUXVldWUubGFzdEVmZmVjdDtcblxuICAgICAgICAgICAgaWYgKGxhc3RFZmZlY3QgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgdmFyIGZpcnN0RWZmZWN0ID0gbGFzdEVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB2YXIgZWZmZWN0ID0gZmlyc3RFZmZlY3Q7XG5cbiAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIHZhciB0YWcgPSBlZmZlY3QudGFnO1xuICAgICAgICAgICAgICAgIHZhciBpbnN0ID0gZWZmZWN0Lmluc3Q7XG4gICAgICAgICAgICAgICAgdmFyIGRlc3Ryb3kgPSBpbnN0LmRlc3Ryb3k7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5zdC5kZXN0cm95ID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncykge1xuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoc2hvdWxkUHJvZmlsZShkZWxldGVkRmliZXIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICAgIGluc3QuZGVzdHJveSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdC5kZXN0cm95ID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgIHNhZmVseUNhbGxEZXN0cm95KGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVzdHJveSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdG9wcGVkKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBlZmZlY3QgPSBlZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgfSB3aGlsZSAoZWZmZWN0ICE9PSBmaXJzdEVmZmVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZURlbGV0aW9uRWZmZWN0cyhmaW5pc2hlZFJvb3QsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlbGV0ZWRGaWJlcik7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJl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tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmVjb3JkTGF5b3V0RWZmZWN0RHVyYXRpb24oZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgUmVmKSB7XG4gICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHNhZmVseURldGFjaFJlZihjdXJyZW50LCBjdXJyZW50LnJldHVybik7XG4gICA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GhvaXN0YWJsZVJvb3QsIG5ld1Jlc291cmNlLCBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudFJlc291cmNlICE9PSBuZXdSZXNvdXJjZSkge1xuICAgICAgICAgICAgICAvLyBXZSBhcmUgbW92aW5nIHRvIG9yIGZyb20gSG9pc3RhYmxlIFJlc291cmNlLCBvciBiZXR3ZWVuIGRpZmZlcmVudCBIb2lzdGFibGUgUmVzb3VyY2VzXG4gICAgICAgICAgICAgIGlmIChjdXJyZW50UmVzb3VyY2UgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudC5zdGF0ZU5vZGUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHVubW91bnRIb2lzdGFibGUoY3VycmVudC5zdGF0ZU5vZGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWxlYXNlUmVzb3VyY2UoY3VycmVudFJlc291cmNlKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChuZXdSZXNvdXJjZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG1vdW50SG9pc3RhYmxlKGhvaXN0YWJsZVJvb3QsIGZpbmlzaGVkV29yay50eXBlLCBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhY3F1aXJlUmVzb3VyY2UoaG9pc3RhYmxlUm9vdCwgbmV3UmVzb3VyY2UsIGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChuZXdSZXNvdXJjZSA9PT0gbnVsbCAmJiBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIC8vIFdlIG1heSBoYXZlIGFuIHVwZGF0ZSBvbiBhIEhvaXN0YWJsZSBlbGVtZW50XG4gICAgICAgICAgICAgIHZhciB1cGRhdGVQYXlsb2FkID0gZmluaXNoZWRXb3JrLnVwZGF0ZVF1ZXVlO1xuICAgICAgICAgICAgICBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWUgPSBudWxsO1xuXG4gICAgICAgICAgICAgIGlmICh1cGRhdGVQYXlsb2FkICE9PSBudWxsIHx8IGRpZmZJbkNvbW1pdFBoYXNlKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIGNvbW1pdFVwZGF0ZShmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLCB1cGRhdGVQYXlsb2FkLCBmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzLCBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9IC8vIEZhbGwgdGhyb3VnaFxuXG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RTaW5nbGV0b246XG4gICAgICB7XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIHZhciBwcmV2aW91c1dvcmsgPSBmaW5pc2hlZFdvcmsuYWx0ZXJuYXRlO1xuXG4gICAgICAgICAgICBpZiAocHJldmlvdXNXb3JrID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBzaW5nbGV0b24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICB2YXIgcHJvcHMgPSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wczsgLy8gVGhpcyB3YXMgYSBuZXcgbW91bnQsIHdlIG5lZWQgdG8gY2xlYXIgYW5kIHNldCBpbml0aWFsIHByb3BlcnRpZXNcblxuICAgICAgICAgICAgICBjbGVhclNpbmdsZXRvbihzaW5nbGV0b24pO1xuICAgICAgICAgICAgICBhY3F1aXJlU2luZ2xldG9uSW5zdGFuY2UoZmluaXNoZWRXb3JrLnR5cGUsIHByb3BzLCBzaW5nbGV0b24sIGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIEZhbGwgdGhyb3VnaFxuXG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgUmVmKSB7XG4gICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHNhZmVseURldGFjaFJlZihjdXJyZW50LCBjdXJyZW50LnJldHVybik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAge1xuICAgICAgICAgIC8vIFRPRE86IENvbnRlbnRSZXNldCBnZXRzIGNsZWFyZWQgYnkgdGhlIGNoaWxkcmVuIGR1cmluZyB0aGUgY29tbWl0XG4gICAgICAgICAgLy8gcGhhc2UuIFRoaXMgaXMgYSByZWZhY3RvciBoYXphcmQgYmVjYXVzZSBpdCBtZWFucyB3ZSBtdXN0IHJlYWRcbi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XplZFByb3BzIDogbmV3VGV4dDtcblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgY29tbWl0VGV4dFVwZGF0ZSh0ZXh0SW5zdGFuY2UsIG9sZFRleHQsIG5ld1RleHQpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIHByZXBhcmVUb0NvbW1pdEhvaXN0YWJsZXMoKTtcbiAgICAgICAgICB2YXIgcHJldmlvdXNIb2lzdGFibGVSb290ID0gY3VycmVudEhvaXN0YWJsZVJvb3Q7XG4gICAgICAgICAgY3VycmVudEhvaXN0YWJsZVJvb3QgPSBnZXRIb2lzdGFibGVSb290KHJvb3QuY29udGFpbmVySW5mbyk7XG4gICAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICAgIGN1cnJlbnRIb2lzdGFibGVSb290ID0gcHJldmlvdXNIb2lzdGFibGVSb290O1xuICAgICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgdmFyIHByZXZSb290U3RhdGUgPSBjdXJyZW50Lm1lbW9pemVkU3RhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHByZXZSb290U3RhdGUuaXNEZWh5ZHJhdGVkKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIGNvbW1pdEh5ZHJhdGVkQ29udGFpbmVyKHJvb3QuY29udGFpbmVySW5mbyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIHZhciBfcHJldmlvdXNIb2lzdGFibGVSb290ID0gY3VycmVudEhvaXN0YWJsZVJvb3Q7XG4gICAgICAgICAgY3VycmVudEhvaXN0YWJsZVJvb3QgPSBnZXRIb2lzdGFibGVSb290KGZpbmlzaGVkV29yay5zdGF0ZU5vZGUuY29udGFpbmVySW5mbyk7XG4gICAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuICAgICAgICAgIGN1cnJlbnRIb2lzdGFibGVSb290ID0gX3ByZXZpb3VzSG9pc3RhYmxlUm9vdDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgU3VzcGVuc2VDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRX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xkKTtcbiAgICAgIGNoaWxkID0gY2hpbGQuc2libGluZztcbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gYWNjdW11bGF0ZVN1c3BlbnNleUNvbW1pdE9uRmliZXIoZmliZXIpIHtcbiAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICBjYXNlIEhvc3RIb2lzdGFibGU6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5QWNjdW11bGF0ZVN1c3BlbnNleUNvbW1pdChmaWJlcik7XG5cbiAgICAgICAgaWYgKGZpYmVyLmZsYWdzICYgc3VzcGVuc2V5Q29tbWl0RmxhZykge1xuICAgICAgICAgIGlmIChmaWJlci5tZW1vaXplZFN0YXRlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzdXNwZW5kUmVzb3VyY2UoIC8vIFRoaXMgc2hvdWxkIGFsd2F5cyBiZSBzZXQgYnkgdmlzaXRpbmcgSG9zdFJvb3QgZmlyc3RcbiAgICAgICAgICAgIGN1cnJlbnRIb2lzdGFibGVSb290LCBmaWJlci5tZW1vaXplZFN0YXRlLCBmaWJlci5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlBY2N1bXVsYXRlU3VzcGVuc2V5Q29tbWl0KGZpYmVyKTtcblxuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICB7XG4gICAgICAgICAgdmFyIHByZXZpb3VzSG9pc3RhYmxlUm9vdCA9IGN1cnJlbnRIb2lzdGFibGVSb290O1xuICAgICAgICAgIHZhciBjb250YWluZXIgPSBmaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICBjdXJyZW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cbiAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNoZWNrcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGNoZWNrID0gY2hlY2tzW2ldO1xuICAgICAgICAgICAgdmFyIGdldFNuYXBzaG90ID0gY2hlY2suZ2V0U25hcHNob3Q7XG4gICAgICAgICAgICB2YXIgcmVuZGVyZWRWYWx1ZSA9IGNoZWNrLnZhbHVlO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBpZiAoIW9iamVjdElzKGdldFNuYXBzaG90KCksIHJlbmRlcmVkVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgLy8gRm91bmQgYW4gaW5jb25zaXN0ZW50IHN0b3JlLlxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgLy8gSWYgYGdldFNuYXBzaG90YCB0aHJvd3MsIHJldHVybiBgZmFsc2VgLiBUaGlzIHdpbGwgc2NoZWR1bGVcbiAgICAgICAgICAgICAgLy8gYSByZS1yZW5kZXIsIGFuZCB0aGUgZXJyb3Igd2lsbCBiZSByZXRocm93biBkdXJpbmcgcmVuZGVyLlxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGNoaWxkID0gbm9kZS5jaGlsZDtcblxuICAgIGlmIChub2RlLnN1YnRyZWVGbGFncyAmIFN0b3JlQ29uc2lzdGVuY3kgJiYgY2hpbGQgIT09IG51bGwpIHtcbiAgICAgIGNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICBub2RlID0gY2hpbGQ7XG4gICAgICBjb250aW51ZTtcbiAgICB9XG5cbiAgICBpZiAobm9kZSA9PT0gZmluaXNoZWRXb3JrKSB7XG4gICAgICByZXR1cm4g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JrSW5Qcm9ncmVzc1N1c3BlbmRlZFJlYXNvbikge1xuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkT25IeWRyYXRpb246XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIC8vIFNlbGVjdGl2ZSBoeWRyYXRpb24uIEFuIHVwZGF0ZSBmbG93ZWQgaW50byBhIGRlaHlkcmF0ZWQgdHJlZS5cbiAgICAgICAgICAgICAgLy8gSW50ZXJydXB0IHRoZSBjdXJyZW50IHJlbmRlciBzbyB0aGUgd29yayBsb29wIGNhbiBzd2l0Y2ggdG8gdGhlXG4gICAgICAgICAgICAgIC8vIGh5ZHJhdGlvbiBsYW5lLlxuICAgICAgICAgICAgICByZXNldFdvcmtJblByb2dyZXNzU3RhY2soKTtcbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3NSb290RXhpdFN0YXR1cyA9IFJvb3REaWROb3RDb21wbGV0ZTtcbiAgICAgICAgICAgICAgYnJlYWsgb3V0ZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlIFN1c3BlbmRlZE9uSW1tZWRpYXRlOlxuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkT25EYXRhOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoIWRpZFN1c3BlbmRJblNoZWxsICYmIGdldFN1c3BlbnNlSGFuZGxlcigpID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgZGlkU3VzcGVuZEluU2hlbGwgPSB0cnVlO1xuICAgICAgICAgICAgICB9IC8vIEludGVudGlvbmFsIGZhbGx0aHJvdWdoXG5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIC8vIFVud2luZCB0aGVuIGNvbnRpbnVlIHdpdGggdGhlIG5vcm1hbCB3b3JrIGxvb3AuXG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzU3VzcGVuZGVkUmVhc29uID0gTm90U3VzcG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0YWNrIG9yXG4gICAgICAgIC8vIHJlcGxheSB0aGUgc3VzcGVuZGVkIGNvbXBvbmVudC5cbiAgICAgICAgdmFyIHVuaXRPZldvcmsgPSB3b3JrSW5Qcm9ncmVzcztcbiAgICAgICAgdmFyIHRocm93blZhbHVlID0gd29ya0luUHJvZ3Jlc3NUaHJvd25WYWx1ZTtcblxuICAgICAgICByZXN1bWVPclVud2luZDogc3dpdGNoICh3b3JrSW5Qcm9ncmVzc1N1c3BlbmRlZFJlYXNvbikge1xuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkT25FcnJvcjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgLy8gVW53aW5kIHRoZW4gY29udGludWUgd2l0aCB0aGUgbm9ybWFsIHdvcmsgbG9vcC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3NTdXNwZW5kZWRSZWFzb24gPSBOb3RTdXNwZW5kZWQ7XG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzVGhyb3duVmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgICB0aHJvd0FuZFVud2luZFdvcmtMb29wKHVuaXRPZldvcmssIHRocm93blZhbHVlKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlIFN1c3BlbmRlZE9uRGF0YTpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIHRoZW5hYmxlID0gdGhyb3duVmFsdWU7XG5cbiAgICAgICAgICAgICAgaWYgKGlzVGhlbmFibGVSZXNvbHZlZCh0aGVuYWJsZSkpIHtcbiAgICAgICAgICAgICAgICAvLyBUaGUgZGF0YSByZXNvbHZlZC4gVHJ5IHJlbmRlcmluZyB0aGUgY29tcG9uZW50IGFnYWluLlxuICAgICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzU3VzcGVuZGVkUmVhc29uID0gTm90U3VzcGVuZGVkO1xuICAgICAgICAgICAgICAgIHdvcmtJblByb2dyZXN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kZXJpbmcuXG4gICAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1N1c3BlbmRlZFJlYXNvbiA9IFN1c3BlbmRlZEFuZFJlYWR5VG9Db250aW51ZTtcbiAgICAgICAgICAgICAgICB9IC8vIEVuc3VyZSB0aGUgcm9vdCBpcyBzY2hlZHVsZWQuIFdlIHNob3VsZCBkbyB0aGlzIGV2ZW4gaWYgd2UncmVcbiAgICAgICAgICAgICAgICAvLyBjdXJyZW50bHkgd29ya2luZyBvbiBhIGRpZmZlcmVudCByb290LCBzbyB0aGF0IHdlIHJlc3VtZVxuICAgICAgICAgICAgICAgIC8vIHJlbmRlcmluZyBsYXRlci5cblxuXG4gICAgICAgICAgICAgICAgZW5zdXJlUm9vdElzU2NoZWR1bGVkKHJvb3QpO1xuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIHRoZW5hYmxlLnRoZW4ob25SZXNvbHV0aW9uLCBvblJlc29sdXRpb24pO1xuICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkT25JbW1lZGlhdGU6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIC8vIElmIHRoaXMgZmliZXIganVzdCBzdXNwZW5kZWQsIGl0J3MgcG9zc2libGUgdGhlIGRhdGEgaXMgYWxyZWFkeVxuICAgICAgICAgICAgICAvLyBjYWNoZWQuIFlpZWxkIHRvIHRoZSBtYWluIHRocmVhZCB0byBnaXZlIGl0IGEgY2hhbmNlIHRvIHBpbmcuIElmXG4gICAgICAgICAgICAgIC8vIGl0IGRvZXMsIHdlIGNhbiByZXRyeSBpbW1lZGlhdGVseSB3aXRob3V0IHVud2luZGluZyB0aGUgc3RhY2suXG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzU3VzcGVuZGVkUmVhc29uID0gU3VzcGVuZGVkQW5kUmVhZHlUb0NvbnRpbnVlO1xuICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkT25JbnN0YW5jZTpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3NTdXNwZW5kZWRSZWFzb24gPSBTdXNwZW5kZWRPbkluc3RhbmNlQW5kUmVhZHlUb0NvbnRpbnVlO1xuICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGNhc2UgU3VzcGVuZGVkQW5kUmVhZHlUb0NvbnRpbnVlOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB2YXIgX3RoZW5hYmxlID0gdGhyb3duVmFsdWU7XG5cbiAgICAgICAgICAgICAgaWYgKGlzVGhlbmFibGVSZXNvbHZlZChfdGhlbmFibGUpKSB7XG4gICAgICAgICAgICAgICAgLy8gVGhlIGRhdGEgcmVzb2x2ZWQuIFRyeSByZW5kZXJpbmcgdGhlIGNvbXBvbmVudCBhZ2Fpbi5cbiAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1N1c3BlbmRlZFJlYXNvbiA9IE5vdFN1c3BlbmRlZDtcbiAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1Rocm93blZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgICAgICByZXBsYXlTdXNwZW5kZWRVbml0T2ZXb3JrKHVuaXRPZldvcmspO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSwgdW53aW5kIHRoZW4gY29udGludWUgd2l0aCB0aGUgbm9ybWFsIHdvcmsgbG9vcC5cbiAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1N1c3BlbmRlZFJlYXNvbiA9IE5vdFN1c3BlbmRlZDtcbiAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1Rocm93blZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgICAgICB0aHJvd0FuZFVud2luZFdvcmtMb29wKHVuaXRPZldvcmssIHRocm93blZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSBTdXNwZW5kZWRPbkluc3RhbmNlQW5kUmVhZHlUb0NvbnRpbnVlOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHdvcmtJblByb2dyZXNzLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RIb2lzdGFibGU6XG4gICAgICAgICAgICAgICAgY2FzZSBIb3N0U2luZ2xldG9uOlxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAvLyBCZWZvcmUgdW53aW5kaW5nIHRoZSBzdGFjaywgY2hlY2sgb25lIG1vcmUgdGltZSBpZiB0aGVcbiAgICAgICAgICAgICAgICAgICAgLy8gaW5zdGFuY2UgaXMgcmVhZHkuIEl0IG1heSBoYXZlIGxvYWRlZCB3aGVuIFJlYWN0IHlpZWxkZWQgdG9cbiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIG1haW4gdGhyZWFkLlxuICAgICAgICAgICAgICAgICAgICAvLyBBc3NpZ25pbmcgdGhpcyB0byBhIGNvbnN0YW50IHNvIEZsb3cga25vd3MgdGhlIGJpbmRpbmcgd29uJ3RcbiAgICAgICAgICAgICAgICAgICAgLy8gYmUgbXV0YXRlZCBieSBgcHJlbG9hZEluc3RhbmNlYC5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGhvc3RGaWJlciA9IHdvcmtJblByb2dyZXNzO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IGhvc3RGaWJlci50eXBlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcHMgPSBob3N0RmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaXNSZWFkeSA9IHByZWxvYWRJbnN0YW5jZSh0eXBlLCBwcm9wcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzUmVhZHkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgZGF0YSByZXNvbHZlZC4gUmVzdW1lIHRoZSB3b3JrIGxvb3AgYXMgaWYgbm90aGluZ1xuICAgICAgICAgICAgICAgICAgICAgIC8vIHN1c3BlbmRlZC4gVW5saWtlIHdoZW4gYSB1c2VyIGNvbXBvbmVudCBzdXNwZW5kcywgd2UgZG9uJ3RcbiAgICAgICAgICAgICAgICAgICAgICAvLyBoYXZlIHRvIHJlcGxheSBhbnl0aGluZyBiZWNhdXNlIHRoZSBob3N0IGZpYmVyXG4gICAgICAgICAgICAgICAgICAgICAgLy8gYWxyZWFkeSBjb21wbGV0ZWQuXG4gICAgICAgICAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3NTdXNwZW5kZWRSZWFzb24gPSBOb3RTdXNwZW5kZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3NUaHJvd25WYWx1ZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHNpYmxpbmcgPSBob3N0RmliZXIuc2libGluZztcblxuICAgICAgICAgICAgICAgICAgICAgIGlmIChzaWJsaW5nICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzcyA9IHNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXR1cm5GaWJlciA9IGhvc3RGaWJlci5yZXR1cm47XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXR1cm5GaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzcyA9IHJldHVybkZpYmVyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZVVuaXRPZldvcmsocmV0dXJuRmliZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIHJlc3VtZU9yVW53aW5kO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHdpbGwgZmFpbCBncmFjZWZ1bGx5IGJ1dCBpdCdzIG5vdCBjb3JyZWN0LCBzbyBsb2cgYVxuICAgICAgICAgICAgICAgICAgICAvLyB3YXJuaW5nIGluIGRldi5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRydWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBlcnJvcignVW5leHBlY3RlZCB0eXBlIG9mIGZpYmVyIHRyaWdnZXJlZCBhIHN1c3BlbnNleSBjb21taXQuICcgKyAnVGhpcyBpcyBhIGJ1ZyBpbiBSZWFjdC4nKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IC8vIE90aGVyd2lzZSwgdW53aW5kIHRoZW4gY29udGludWUgd2l0aCB0aGUgbm9ybWFsIHdvcmsgbG9vcC5cblxuXG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzU3VzcGVuZGVkUmVhc29uID0gTm90U3VzcGVuZGVkO1xuICAgICAgICAgICAgICB3b3JrSW5Qcm9ncmVzc1Rocm93blZhbHVlID0gbnVsb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NUX1NDT1BFX1RZUEU6XG5cbiAgICAgIC8vIEZhbGwgdGhyb3VnaFxuXG4gICAgICBjYXNlIFJFQUNUX0NBQ0hFX1RZUEU6XG4gICAgICAgIHtcbiAgICAgICAgICByZXR1cm4gY3JlYXRlRmliZXJGcm9tQ2FjaGUocGVuZGluZ1Byb3BzLCBtb2RlLCBsYW5lcywga2V5KTtcbiAgICAgICAgfVxuXG4gICAgICAvLyBGYWxsIHRocm91Z2hcblxuICAgICAgY2FzZSBSRUFDVF9UUkFDSU5HX01BUktFUl9UWVBFOlxuXG4gICAgICAvLyBGYWxsIHRocm91Z2hcblxuICAgICAgY2FzZSBSRUFDVF9ERUJVR19UUkFDSU5HX01PREVfVFlQRTpcblxuICAgICAgLy8gRmFsbCB0aHJvdWdoXG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHR5cGUgPT09ICdvYmplY3QnICYmIHR5cGUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodHlwZS4kJHR5cGVvZikge1xuICAgICAgICAgICAgICBjYXNlIFJFQUNUX1BST1ZJREVSX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBDb250ZXh0UHJvdmlkZXI7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfQ09OVEVYVF9UWVBFOlxuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSBjb25zdW1lclxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dENvbnN1bWVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0ZPUldBUkRfUkVGX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBGb3J3YXJkUmVmO1xuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRUeXBlID0gcmVzb2x2ZUZvcndhcmRSZWZGb3JIb3RSZWxvYWRpbmcocmVzb2x2ZWRUeXBlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9NRU1PX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBNZW1vQ29tcG9uZW50O1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IExhenlDb21wb25lbnQ7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZWRUeXBlID0gbnVsbDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGluZm8gPSAnJztcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICh0eXBlID09PSB1bmRlZmluZWQgfHwgdHlwZW9mIHR5cGUgPT09ICdvYmplY3QnICYmIHR5cGUgIT09IG51bGwgJiYgT2JqZWN0LmtleXModHlwZSkubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgIGluZm8gKz0gJyBZb3UgbGlrZWx5IGZvcmdvdCB0byBleHBvcnQgeW91ciBjb21wb25lbnQgZnJvbSB0aGUgZmlsZSAnICsgXCJpdCdzIGRlZmluZWQgaW4sIG9yIHlvdSBtaWdodCBoYXZlIG1peGVkIHVwIGRlZmF1bHQgYW5kIFwiICsgJ25hbWVkIGltcG9ydHMuJztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIG93bmVyTmFtZSA9IG93bmVyID8gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihvd25lcikgOiBudWxsO1xuXG4gICAgICAgICAgICBpZiAob3duZXJOYW1lKSB7XG4gICAgIC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ci5cbiAgICAgICAgICAgIC8vIE5vcm1hbGx5IHBvcnRhbHMgaGFuZGxlIHRoZWlyIG93biBldmVudHMgYWxsIHRoZSB3YXkgZG93biB0byB0aGUgcm9vdC5cbiAgICAgICAgICAgIC8vIFNvIHdlIHNob3VsZCBiZSBhYmxlIHRvIHN0b3Agbm93LiBIb3dldmVyLCB3ZSBkb24ndCBrbm93IGlmIHRoaXMgcG9ydGFsXG4gICAgICAgICAgICAvLyB3YXMgcGFydCBvZiAqb3VyKiByb290LlxuICAgICAgICAgICAgdmFyIGdyYW5kTm9kZSA9IG5vZGUucmV0dXJuO1xuXG4gICAgICAgICAgICB3aGlsZSAoZ3JhbmROb2RlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBncmFuZFRhZyA9IGdyYW5kTm9kZS50YWc7XG5cbiAgICAgICAgICAgICAgaWYgKGdyYW5kVGFnID09PSBIb3N0Um9vdCB8fCBncmFuZFRhZyA9PT0gSG9zdFBvcnRhbCkge1xuICAgICAgICAgICAgICAgIHZhciBncmFuZENvbnRhaW5lciA9IGdyYW5kTm9kZS5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgICAgICAgIGlmIChpc01hdGNoaW5nUm9vdENvbnRhaW5lcihncmFuZENvbnRhaW5lciwgdGFyZ2V0Q29udGFpbmVyTm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgdGhlIHJvb3RDb250YWluZXIgd2UncmUgbG9va2luZyBmb3IgYW5kIHdlIGZvdW5kIGl0IGFzXG4gICAgICAgICAgICAgICAgICAvLyBhIHBhcmVudCBvZiB0aGUgUG9ydGFsLiBUaGF0IG1lYW5zIHdlIGNhbiBpZ25vcmUgaXQgYmVjYXVzZSB0aGVcbiAgICAgICAgICAgICAgICAgIC8vIFBvcnRhbCB3aWxsIGJ1YmJsZSB0aHJvdWdoIHRvIHVzLlxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgIC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ZiAodmFsdWUgIT0gbnVsbCkge1xuICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICdvYmplY3QnIHx8ICEoJ19faHRtbCcgaW4gdmFsdWUpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ2Bwcm9wcy5kYW5nZXJvdXNseVNldElubmVySFRNTGAgbXVzdCBiZSBpbiB0aGUgZm9ybSBge19faHRtbDogLi4ufWAuICcgKyAnUGxlYXNlIHZpc2l0IGh0dHBzOi8vcmVhY3Rqcy5vcmcvbGluay9kYW5nZXJvdXNseS1zZXQtaW5uZXItaHRtbCAnICsgJ2ZvciBtb3JlIGluZm9ybWF0aW9uLicpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBuZXh0SHRtbCA9IHZhbHVlLl9faHRtbDtcblxuICAgICAgICAgIGlmIChuZXh0SHRtbCAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAocHJvcHMuY2hpbGRyZW4gIT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0NhbiBvbmx5IHNldCBvbmUgb2YgYGNoaWxkcmVuYCBvciBgcHJvcHMuZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUxgLicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHNldElubmVySFRNTCQxKGRvbUVsZW1lbnQsIG5leHRIdG1sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgIGNhc2UgJ2NoaWxkcmVuJzpcbiAgICAgIHtcbiAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICBzZXRUZXh0Q29udGVudChkb21FbGVtZW50LCB2YWx1ZSk7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHZhbHVlID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHNldFRleHRDb250ZW50KGRvbUVsZW1lbnQsICcnICsgdmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlICdvblNjcm9sbCc6XG4gICAgICB7XG4gICAgICAgIGlmICh2YWx1ZSAhPSBudWxsKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgd2FybkZvckludmFsaWRFdmVudExpc3RlbmVyKGtleSwgdmFsdWUpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxpc3RlblRvTm9uRGVsZWdhdGVkRXZlbnQoJ3Njcm9sbCcsIGRvbUVsZW1lbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlICdvbkNsaWNrJzpcbiAgICAgIHtcbiAgICAgICAgLy8gVE9ETzogVGhpcyBjYXN0IG1heSBub3QgYmUgc291bmQgZm9yIFNWRywgTWF0aE1MIG9yIGN1c3RvbSBlbGVtZW50cy5cbiAgICAgICAgaWYgKHZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB3YXJuRm9ySW52YWxpZEV2ZW50TGlzdGVuZXIoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdHJhcENsaWNrT25Ob25JbnRlcmFjdGl2ZUVsZW1lbnQoZG9tRWxlbWVudCk7XG4gICAgICAgIH1cblxuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgIGNhc2UgJ3N1cHByZXNzQ29udGVudEVkaXRhYmxlV2FybmluZyc6XG4gICAgY2FzZSAnc3VwcHJlc3NIeWRyYXRpb25XYXJuaW5nJzpcbiAgICBjYXNlICdpbm5lckhUTUwnOlxuICAgICAge1xuICAgICAgICAvLyBOb29wXG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m9wc1twcm9wS2V5XTtcblxuICAgICAgICAgIGlmIChwcm9wVmFsdWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3dpdGNoIChwcm9wS2V5KSB7XG4gICAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIG5hbWUgPSBwcm9wVmFsdWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSAndHlwZSc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0eXBlID0gcHJvcFZhbHVlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2NoZWNrZWQnOlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY2hlY2tlZCA9IHByb3BWYWx1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdkZWZhdWx0Q2hlY2tlZCc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0Q2hlY2tlZCA9IHByb3BWYWx1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICd2YWx1ZSc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHByb3BWYWx1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdkZWZhdWx0VmFsdWUnOlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlID0gcHJvcFZhbHVlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgIC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3NlbGVjdCc6XG4gICAgICB7XG4gICAgICAgIHtcbiAgICAgICAgICBjaGVja0NvbnRyb2xsZWRWYWx1ZVByb3BzKCdzZWxlY3QnLCBwcm9wcyk7XG4gICAgICAgIH0gLy8gV2UgbGlzdGVuIHRvIHRoaXMgZXZlbnQgaW4gY2FzZSB0byBlbnN1cmUgZW11bGF0ZWQgYnViYmxlXG4gICAgICAgIC8vIGxpc3RlbmVycyBzdGlsbCBmaXJlIGZvciB0aGUgaW52YWxpZCBldmVudC5cblxuXG4gICAgICAgIGxpc3RlblRvTm9uRGVsZWdhdGVkRXZlbnQoJ2ludmFsaWQnLCBkb21FbGVtZW50KTtcbiAgICAgICAgdmFyIF92YWx1ZSA9IG51bGw7XG4gICAgICAgIHZhciBfZGVmYXVsdFZhbHVlID0gbnVsbDtcbiAgICAgICAgdmFyIG11bHRpcGxlID0gbnVsbDtcblxuICAgICAgICBmb3IgKHZhciBfcHJvcEtleSBpbiBwcm9wcykge1xuICAgICAgICAgIGlmICghcHJvcHMuaGFzT3duUHJvcGVydHkoX3Byb3BLZXkpKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgX3Byb3BWYWx1ZSA9IHByb3BzW19wcm9wS2V5XTtcblxuICAgICAgICAgIGlmIChfcHJvcFZhbHVlID09IG51bGwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHN3aXRjaCAoX3Byb3BLZXkpIHtcbiAgICAgICAgICAgIGNhc2UgJ3ZhbHVlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIF92YWx1ZSA9IF9wcm9wVmFsdWU7IC8vIFRoaXMgaXMgaGFuZGxlZCBieSBpbml0U2VsZWN0IGJlbG93LlxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSAnZGVmYXVsdFZhbHVlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIF9kZWZhdWx0VmFsdWUgPSBfcHJvcFZhbHVlOyAvLyBUaGlzIGlzIGhhbmRsZWQgYnkgaW5pdFNlbGVjdCBiZWxvdy5cblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ211bHRpcGxlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIG11bHRpcGxlID0gX3Byb3BWYWx1ZTsgLy8gVE9ETzogV2UgZG9uJ3QgYWN0dWFsbHkgaGF2ZSB0byBmYWxsIHRocm91Z2ggaGVyZSBiZWNhdXNlIHdlIHNldCBpdFxuICAgICAgICAgICAgICAgIC8vIGluIGluaXRTZWxlY3QgYW55d2F5LiBXZSBjYW4gcmVtb3ZlIHRoZSBzcGVjaWFsIGNhc2UgaW4gc2V0UHJvcC5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gRmFsbHRocm91Z2hcblxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHNldFByb3AoZG9tRWxlbWVudCwgdGFnLCBfcHJvcEtleSwgX3Byb3BWYWx1ZSwgcHJvcHMsIG51bGwpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsaWRhdGVTZWxlY3RQcm9wcyhkb21FbGVtZW50LCBwcm9wcyk7XG4gICAgICAgIGluaXRTZWxlY3QoZG9tRWxlbWVudCwgX3ZhbHVlLCBfZGVmYXVsdFZhbHVlLCBtdWx0aXBsZSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgJ3RleHRhcmVhJzpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIGNoZWNrQ29udHJvbGxlZFZhbHVlUHJvcHMoJ3RleHRhcmVhJywgcHJvcHMpO1xuICAgICAgICB9IC8vIFdlIGxpc3RlbiB0byB0aGlzIGV2ZW50IGluIGNhc2UgdG8gZW5zdXJlIGVtdWxhdGVkIGJ1YmJsZVxuICAgICAgICAvLyBsaXN0ZW5lcnMgc3RpbGwgZmlyZSBmb3IgdGhlIGludmFsaWQgZXZlbnQuXG5cblxuICAgICAgICBsaXN0ZW5Ub05vbkRlbGVnYXRlZEV2ZW50KCdpbnZhbGlkJywgZG9tRWxlbWVudCk7XG4gICAgICAgIHZhciBfdmFsdWUyID0gbnVsbDtcbiAgICAgICAgdmFyIF9kZWZhdWx0VmFsdWUyID0gbnVsbDtcbiAgICAgICAgdmFyIGNoaWxkcmVuID0gbnVsbDtcblxuICAgICAgICBmb3IgKHZhciBfcHJvcEtleTIgaW4gcHJvcHMpIHtcbiAgICAgICAgICBpZiAoIXByb3BzLmhhc093blByb3BlcnR5KF9wcm9wS2V5MikpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBfcHJvcFZhbHVlMiA9IHByb3BzW19wcm9wS2V5Ml07XG5cbiAgICAgICAgICBpZiAoX3Byb3BWYWx1ZTIgPT0gbnVsbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3dpdGNoIChfcHJvcEtleTIpIHtcbiAgICAgICAgICAgIGNhc2UgJ3ZhbHVlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIF92YWx1ZTIgPSBfcHJvcFZhbHVlMjsgLy8gVGhpcyBpcyBoYW5kbGVkIGJ5IGluaXRUZXh0YXJlYSBiZWxvdy5cblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2RlZmF1bHRWYWx1ZSc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBfZGVmYXVsdFZhbHVlMiA9IF9wcm9wVmFsdWUyO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2NoaWxkcmVuJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gX3Byb3BWYWx1ZTI7IC8vIEhhbmRsZWQgYnkgaW5pdFRleHRhcmVhIGFib3ZlLlxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSAnZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUwnOlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWYgKF9wcm9wVmFsdWUyICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIC8vIFRPRE86IERvIHdlIHJlYWxseSBuZWVkIGEgc3BlY2lhbCBlcnJvciBtZXNzYWdlIGZvciB0aGlzLiBJdCdzIGFsc28gcHJldHR5IGJsdW50LlxuICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUxgIGRvZXMgbm90IG1ha2Ugc2Vuc2Ugb24gPHRleHRhcmVhPi4nKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgc2V0UHJvcChkb21FbGVtZW50LCB0YWcsIF9wcm9wS2V5MiwgX3Byb3BWYWx1ZTIsIHByb3BzLCBudWxsKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBUT0RPOiBNYWtlIHN1cmUgd2UgY2hlY2sgaWYgdGhpcyBpcyBzdGlsbCB1bm1vdW50ZWQgb3IgZG8gYW55IGNsZWFuXG4gICAgICAgIC8vIHVwIG5lY2Vzc2FyeSBzaW5jZSB3ZSBuZXZlciBzdG9wIHRyYWNraW5nIGFueW1vcmUuXG5cblxuICAgICAgICB2YWxpZGF0ZVRleHRhcmVhUHJvcHMoZG9tRWxlbWVudCwgcHJvcHMpO1xuICAgICAgICBpbml0VGV4dGFyZWEoZG9tRWxlbWVudCwgX3ZhbHVlMiwgX2RlZmF1bHRWYWx1ZTIsIGNoaWxkcmVuKTtcbiAgICAgICAgdHJhY2soZG9tRWxlbWVudCk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgJ29wdGlvbic6XG4gICAgICB7XG4gICAgICAgIHZhbGlkYXRlT3B0aW9uUHJvcHMoZG9tRWxlbWVudCwgcHJvcHMpO1xuXG4gICAgICAgIGZvciAodmFyIF9wcm9wS2V5MyBpbiBwcm9wcykge1xuICAgICAgICAgIGlmICghcHJvcHMuaGFzT3duUHJvcGVydHkoX3Byb3BLZXkzKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIF9wcm9wVmFsdWUzID0gcHJvcHNbX3Byb3BLZXkzXTtcblxuICAgICAgICAgIGlmIChfcHJvcFZhbHVlMyA9PSBudWxsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBzd2l0Y2ggKF9wcm9wS2V5Mykge1xuICAgICAgICAgICAgY2FzZSAnc2VsZWN0ZWQnOlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLy8gVE9ETzogUmVtb3ZlIHN1cHBvcnQgZm9yIHNlbGVjdGVkIG9uIG9wdGlvbi5cbiAgICAgICAgICAgICAgICBkb21FbGVtZW50LnNlbGVjdGVkID0gX3Byb3BWYWx1ZTMgJiYgdHlwZW9mIF9wcm9wVmFsdWUzICE9PSAnZnVuY3Rpb24nICYmIHR5cGVvZiBfcHJvcFZhbHVlMyAhPT0gJ3N5bWJvbCc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgIC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IHdhcm5pbmcgdG8gYXZvaWQgdGhpcyBkZW55IGxpc3Q/XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKHRhZyArIFwiIGlzIGEgdm9pZCBlbGVtZW50IHRhZyBhbmQgbXVzdCBuZWl0aGVyIGhhdmUgYGNoaWxkcmVuYCBub3IgXCIgKyAndXNlIGBkYW5nZXJvdXNseVNldElubmVySFRNTGAuJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGRlZmF1bHRDaGVja2VkIGFuZCBkZWZhdWx0VmFsdWUgYXJlIGlnbm9yZWQgYnkgc2V0UHJvcFxuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgc2V0UHJvcChkb21FbGVtZW50LCB0YWcsIF9wcm9wS2V5NCwgX3Byb3BWYWx1ZTQsIHByb3BzLCBudWxsKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGRlZmF1bHQ6XG4gICAgICB7XG4gICAgICAgIGlmIChpc0N1c3RvbUVsZW1lbnQodGFnKSkge1xuICAgICAgICAgIGZvciAodmFyIF9wcm9wS2V5NSBpbiBwcm9wcykge1xuICAgICAgICAgICAgaWYgKCFwcm9wcy5oYXNPd25Qcm9wZXJ0eShfcHJvcEtleTUpKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgX3Byb3BWYWx1ZTUgPSBwcm9wc1tfcHJvcEtleTVdO1xuXG4gICAgICAgICAgICBpZiAoX3Byb3BWYWx1ZTUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0UHJvcE9uQ3VzdG9tRWxlbWVudChkb21FbGVtZW50LCB0YWcsIF9wcm9wS2V5NSwgX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bmV4dFByb3AgIT09IGxhc3RQcm9wICYmIChuZXh0UHJvcCAhPSBudWxsIHx8IGxhc3RQcm9wICE9IG51bGwpKSB7XG4gICAgICBzd2l0Y2ggKHByb3BLZXkpIHtcbiAgICAgICAgY2FzZSAnc3R5bGUnOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChsYXN0UHJvcCkge1xuICAgICAgICAgICAgICAvLyBVbnNldCBzdHlsZXMgb24gYGxhc3RQcm9wYCBidXQgbm90IG9uIGBuZXh0UHJvcGAuXG4gICAgICAgICAgICAgIGZvciAoc3R5bGVOYW1lIGluIGxhc3RQcm9wKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxhc3RQcm9wLmhhc093blByb3BlcnR5KHN0eWxlTmFtZSkgJiYgKCFuZXh0UHJvcCB8fCAhbmV4dFByb3AuaGFzT3duUHJvcGVydHkoc3R5bGVOYW1lKSkpIHtcbiAgICAgICAgICAgICAgICAgIGlmICghc3R5bGVVcGRhdGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0eWxlVXBkYXRlcyA9IHt9O1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBzdHlsZVVwZGF0ZXNbc3R5bGVOYW1lXSA9ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSAvLyBVcGRhdGUgc3R5bGVzIHRoYXQgY2hhbmdlZCBzaW5jZSBgbGFzdFByb3BgLlxuXG5cbiAgICAgICAgICAgICAgZm9yIChzdHlsZU5hbWUgaW4gbmV4dFByb3ApIHtcbiAgICAgICAgICAgICAgICBpZiAobmV4dFByb3AuaGFzT3duUHJvcGVydHkoc3R5bGVOYW1lKSAmJiBsYXN0UHJvcFtzdHlsZU5hbWVdICE9PSBuZXh0UHJvcFtzdHlsZU5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIXN0eWxlVXBkYXRlcykge1xuICAgICAgICAgICAgICAgICAgICBzdHlsZVVwZGF0ZXMgPSB7fTtcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgc3R5bGVVcGRhdGVzW3N0eWxlTmFtZV0gPSBuZXh0UHJvcFtzdHlsZU5hbWVdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgLy8gUmVsaWVzIG9uIGB1cGRhdGVTdHlsZXNCeUlEYCBub3QgbXV0YXRpbmcgYHN0eWxlVXBkYXRlc2AuXG4gICAgICAgICAgICAgIGlmICghc3R5bGVVcGRhdGVzKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF1cGRhdGVQYXlsb2FkKSB7XG4gICAgICAgICAgICAgICAgICB1cGRhdGVQYXlsb2FkID0gW107XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdXBkYXRlUGF5bG9hZC5wdXNoKHByb3BLZXksIHN0eWxlVXBkYXRlcyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBzdHlsZVVwZGF0ZXMgPSBuZXh0UHJvcDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ2lzJzpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBlcnJvcignQ2Fubm90IHVwZGF0ZSB0aGUgXCJpc1wiIHByb3AgYWZ0ZXIgaXQgaGFzIGJlZW4gaW5pdGlhbGl6ZWQuJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgIC8vIEZhbGwgdGhyb3VnaFxuXG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAge1xuICAgICAgICAgICAgKHVwZGF0ZVBheWxvYWQgPSB1cGRhdGVQYXlsb2FkIHx8IFtdKS5wdXNoKHByb3BLZXksIG5leHRQcm9wKTtcbiAgICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgaWYgKHN0eWxlVXBkYXR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Y2hlY2tlZDtcbiAgICAgICAgdmFyIGRlZmF1bHRDaGVja2VkID0gbmV4dFByb3BzLmRlZmF1bHRDaGVja2VkO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdXBkYXRlUGF5bG9hZC5sZW5ndGg7IGkgKz0gMikge1xuICAgICAgICAgIHZhciBwcm9wS2V5ID0gdXBkYXRlUGF5bG9hZFtpXTtcbiAgICAgICAgICB2YXIgcHJvcFZhbHVlID0gdXBkYXRlUGF5bG9hZFtpICsgMV07XG5cbiAgICAgICAgICBzd2l0Y2ggKHByb3BLZXkpIHtcbiAgICAgICAgICAgIGNhc2UgJ3R5cGUnOlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdjaGVja2VkJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2RlZmF1bHRDaGVja2VkJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ3ZhbHVlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2RlZmF1bHRWYWx1ZSc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdjaGlsZHJlbic6XG4gICAgICAgICAgICBjYXNlICdkYW5nZXJvdXNseVNldElubmVySFRNTCc6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAocHJvcFZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcih0YWcgKyBcIiBpcyBhIHZvaWQgZWxlbWVudCB0YWcgYW5kIG11c3QgbmVpdGhlciBoYXZlIGBjaGlsZHJlbmAgbm9yIFwiICsgJ3VzZSBgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUxgLicpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBzZXRQcm9wKGRvbUVsZW1lbnQsIHRhZywgcHJvcEtleSwgcHJvcFZhbHVlLCBuZXh0UHJvcHMsIGxhc3RQcm9wc1twcm9wS2V5XSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHdhc0NvbnRyb2xsZWQgPSBsYXN0UHJvcHMudHlwZSA9PT0gJ2NoZWNrYm94JyB8fCBsYXN0UHJvcHMudHlwZSA9PT0gJ3JhZGlvJyA/IGxhc3RQcm9wcy5jaGVja2VkICE9IG51bGwgOiBsYXN0UHJvcHMudmFsdWUgIT0gbnVsbDtcbiAgICAgICAgICB2YXIgaXNDb250cm9sbGVkID0gbmV4dFByb3BzLnR5cGUgPT09ICdjaGVja2JveCcgfHwgbmV4dFByb3BzLnR5cGUgPT09ICdyYWRpbycgPyBuZXh0UHJvcHMuY2hlY2tlZCAhPSBudWxsIDogbmV4dFByb3BzLnZhbHVlICE9IG51bGw7XG5cbiAgICAgICAgICBpZiAoIXdhc0NvbnRyb2xsZWQgJiYgaXNDb250cm9sbGVkICYmICFkaWRXYXJuVW5jb250cm9sbGVkVG9Db250cm9sbGVkKSB7XG4gICAgICAgICAgICBlcnJvcignQSBjb21wb25lbnQgaXM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VuZ3RoOyBfaTIgKz0gMikge1xuICAgICAgICAgIHZhciBfcHJvcEtleTIxID0gdXBkYXRlUGF5bG9hZFtfaTJdO1xuICAgICAgICAgIHZhciBfcHJvcFZhbHVlOCA9IHVwZGF0ZVBheWxvYWRbX2kyICsgMV07XG5cbiAgICAgICAgICBzd2l0Y2ggKF9wcm9wS2V5MjEpIHtcbiAgICAgICAgICAgIGNhc2UgJ3ZhbHVlJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgaGFuZGxlZCBieSB1cGRhdGVXcmFwcGVyIGJlbG93LlxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2NoaWxkcmVuJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IFRoaXMgZG9lc24ndCBhY3R1YWxseSBkbyBhbnl0aGluZyBpZiBpdCB1cGRhdGVzLlxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgJ2Rhbmdlcm91c2x5U2V0SW5uZXJIVE1MJzpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmIChfcHJvcFZhbHVlOCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAvLyBUT0RPOiBEbyB3ZSByZWFsbHkgbmVlZCBhIHNwZWNpYWwgZXJyb3IgbWVzc2FnZSBmb3IgdGhpcy4gSXQncyBhbHNvIHByZXR0eSBibHVudC5cbiAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignYGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MYCBkb2VzIG5vdCBtYWtlIHNlbnNlIG9uIDx0ZXh0YXJlYT4uJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8v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A9PT0gZmFsc2UpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgIH1cbiAgfSBlbHNlIHtcbiAgICBpZiAodmFsdWUgPT0gbnVsbCkgOyBlbHNlIHtcbiAgICAgIHN3aXRjaCAodHlwZW9mIHZhbHVlKSB7XG4gICAgICAgIGNhc2UgJ2Z1bmN0aW9uJzpcbiAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICdib29sZWFuJzpcbiAgICAgICAgICBpZiAodmFsdWUgPT09IHRydWUgJiYgc2VydmVyVmFsdWUgPT09ICcnKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNoZWNrQXR0cmlidXRlU3RyaW5nQ29lcmNpb24odmFsdWUsIHByb3BLZXkpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc2VydmVyVmFsdWUgPT09ICcnICsgdmFsdWUpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICB3YXJuRm9yUHJvcERpZmZlcmVuY2UocHJvcEtleSwgc2VydmVyVmFsdWUsIHZhbHVlKTtcbn1cblxuZnVuY3Rpb24gaHlkcmF0ZUJvb2xlYW5pc2hBdHRyaWJ1dGUoZG9tRWxlbWVudCwgcHJvcEtleSwgYXR0cmlidXRlTmFtZSwgdmFsdWUsIGV4dHJhQXR0cmlidXRlcykge1xuICBleHRyYUF0dHJpYnV0ZXMuZGVsZXRlKGF0dHJpYnV0ZU5hbWUpO1xuICB2YXIgc2VydmVyVmFsdWUgPSBkb21FbGVtZW50LmdldEF0dHJpYnV0ZShhdHRyaWJ1dGVOYW1lKTtcblxuICB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mVySW5zdGFuY2UpIHtcbiAgdmFyIHR5cGU7XG4gIHZhciBjb250ZXh0O1xuICB2YXIgbm9kZVR5cGUgPSByb290Q29udGFpbmVySW5zdGFuY2Uubm9kZVR5cGU7XG5cbiAgc3dpdGNoIChub2RlVHlwZSkge1xuICAgIGNhc2UgRE9DVU1FTlRfTk9ERTpcbiAgICBjYXNlIERPQ1VNRU5UX0ZSQUdNRU5UX05PREU6XG4gICAgICB7XG4gICAgICAgIHR5cGUgPSBub2RlVHlwZSA9PT0gRE9DVU1FTlRfTk9ERSA/ICcjZG9jdW1lbnQnIDogJyNmcmFnbWVudCc7XG4gICAgICAgIHZhciByb290ID0gcm9vdENvbnRhaW5lckluc3RhbmNlLmRvY3VtZW50RWxlbWVudDtcblxuICAgICAgICBpZiAocm9vdCkge1xuICAgICAgICAgIHZhciBuYW1lc3BhY2VVUkkgPSByb290Lm5hbWVzcGFjZVVSSTtcbiAgICAgICAgICBjb250ZXh0ID0gbmFtZXNwYWNlVVJJID8gZ2V0T3duSG9zdENvbnRleHQobmFtZXNwYWNlVVJJKSA6IEhvc3RDb250ZXh0TmFtZXNwYWNlTm9uZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb250ZXh0ID0gSG9zdENvbnRleHROYW1lc3BhY2VOb25lO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBkZWZhdWx0OlxuICAgICAge1xuICAgICAgICB2YXIgY29udGFpbmVyID0gbm9kZVR5cGUgPT09IENPTU1FTlRfTk9ERSA/IHJvb3RDb250YWluZXJJbnN0YW5jZS5wYXJlbnROb2RlIDogcm9vdENvbnRhaW5lckluc3RhbmNlO1xuICAgICAgICB0eXBlID0gY29udGFpbmVyLnRhZ05hbWU7XG4gICAgICAgIHZhciBfbmFtZXNwYWNlVVJJID0gY29udGFpbmVyLm5hbWVzcGFjZVVSSTtcblxuICAgICAgICBpZiAoIV9uYW1lc3BhY2VVUkkpIHtcbiAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ3N2Zyc6XG4gICAgICAgICAgICAgIGNvbnRleHQgPSBIb3N0Q29udGV4dE5hbWVzcGFjZVN2ZztcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ21hdGgnOlxuICAgICAgICAgICAgICBjb250ZXh0ID0gSG9zdENvbnRleHROYW1lc3BhY2VNYXRoO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgY29udGV4dCA9IEhvc3RDb250ZXh0TmFtZXNwYWNlTm9uZTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBvd25Db250ZXh0ID0gZ2V0T3duSG9zdENvbnRleHQoX25hbWVzcGFjZVVSSSk7XG4gICAgICAgICAgY29udGV4dCA9IGdldENoaWxkSG9zdENvbnRleHRQcm9kKG93bkNvbnRleHQsIHR5cGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gIH1cblxuICB7XG4gICAgdmFyIHZhbGlkYXRlZFRhZyA9IHR5cGUudG9Mb3dlckNhc2UoKTtcbiAgICB2YXIgYW5jZXN0b3JJbmZvID0gdXBkYXRlZEFuY2VzdG9ySW5mb0RldihudWxsLCB2YWxpZGF0ZWRUYWcpO1xuICAgIHJldHVybiB7XG4gICAgICBjb250ZXh0OiBjb250ZXh0LFxuICAgICAgYW5jZXN0b3JJbmZvOiBhbmNlc3RvckluZm9cbiAgICB9O1xuICB9XG59XG5cbmZ1bmN0aW9uIGdldE93bkhvc3RDb250ZXh0KG5hbWVzcGFjZVVSSSkge1xuICBzd2l0Y2ggKG5hbWVzcGFjZVVSSSkge1xuICAgIGNhc2UgU1ZHX05BTUVTUEFDRTpcbiAgICAgIHJldHVybiBIb3N0Q29udGV4dE5h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hcnkgd2hlbiBhIHNlbGVjdCBpbiBcInNpbmdsZSBzZWxlY3Rpb24gbW9kZVwiLlxuICAgICAgICAgICAgICBkb21FbGVtZW50LnNpemUgPSBwcm9wcy5zaXplO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHByb3BzLmlzID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBkb21FbGVtZW50ID0gb3duZXJEb2N1bWVudC5jcmVhdGVFbGVtZW50KHR5cGUsIHtcbiAgICAgICAgICAgICAgICBpczogcHJvcHMuaXNcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAvLyBTZXBhcmF0ZSBlbHNlIGJyYW5jaCBpbnN0ZWFkIG9mIHVzaW5nIGBwcm9wcy5pcyB8fCB1bmRlZmluZWRgIGFib3ZlIGJlY2F1c2Ugb2YgYSBGaXJlZm94IGJ1Zy5cbiAgICAgICAgICAgICAgLy8gU2VlIGRpc2N1c3Npb24gaW4gaHR0cHM6Ly9naXRodWIuY29tL2ZhY2Vib29rL3JlYWN0L3B1bGwvNjg5NlxuICAgICAgICAgICAgICAvLyBhbmQgZGlzY3Vzc2lvbiBpbiBodHRwczovL2J1Z3ppbGxhLm1vemlsbGEub3JnL3Nob3dfYnVnLmNnaT9pZD0xMjc2MjQwXG4gICAgICAgICAgICAgIGRvbUVsZW1lbnQgPSBvd25lckRvY3VtZW50LmNyZWF0ZUVsZW1lbnQodHlwZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGUuaW5kZXhPZignLScpID09PSAtMSkge1xuICAgICAgICAgICAgICAgIC8vIFdlJ3JlIG5vdCBTVkcvTWF0aE1MIGFuZCB3ZSBkb24ndCBoYXZlIGEgZGFzaCwgc28gd2UncmUgbm90IGEgY3VzdG9tIGVsZW1lbnRcbiAgICAgICAgICAgICAgICAvLyBFdmVuIGlmIHlvdSB1c2UgYGlzYCwgdGhlc2Ugc2hvdWxkIGJlIG9mIGtub3duIHR5cGUgYW5kIGxvd2VyIGNhc2UuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgIT09IHR5cGUudG9Mb3dlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgZXJyb3IoJzwlcyAvPiBpcyB1c2luZyBpbmNvcnJlY3QgY2FzaW5nLiAnICsgJ1VzZSBQYXNjYWxDYXNlIGZvciBSZWFjdCBjb21wb25lbnRzLCAnICsgJ29yIGxvd2VyY2FzZSBmb3IgSFRNTCBlbGVtZW50cy4nLCB0eXBlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIC8vICRGbG93Rml4TWVbbWV0aG9kLXVuYmluZGluZ11cbiAgICAgICAgICAgICAgICBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoZG9tRWxlbWVudCkgPT09ICdbb2JqZWN0IEhUTUxVbmtub3duRWxlbWVudF0nICYmICFoYXNPd25Qcm9wZXJ0eS5jYWxsKHdhcm5lZFVua25vd25UYWdzLCB0eXBlKSkge1xuICAgICAgICAgICAgICAgICAgd2FybmVkVW5rbm93blRhZ3NbdHlwZV0gPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgICBlcnJvcignVGhlIHRhZyA8JXM+IGlzIHVucmVjb2duaXplZCBpbiB0aGlzIGJyb3dzZXIuICcgKyAnSWYgeW91IG1lYW50IHRvIHJlbmRlciBhIFJlYWN0IGNvbXBvbmVudCwgc3RhcnQgaXRzIG5hbWUgd2l0aCAnICsgJ2FuIHVwcGVyY2FzZSBsZXR0ZXIuJywgdHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gIH1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gaWYgKHJlc291cmNlKSB7XG4gICAgICAgICAgICAvLyBXZSBjYW4gZWFybHkgcmV0dXJuLiBUaGUgcmVzb3VyY2UgZXhpc3RzIGFuZCB0aGVyZSBpcyBub3RoaW5nXG4gICAgICAgICAgICAvLyBtb3JlIHRvIGRvXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIHN0YXRlID0ge1xuICAgICAgICAgICAgbG9hZGluZzogTm90TG9hZGVkLFxuICAgICAgICAgICAgcHJlbG9hZDogbnVsbFxuICAgICAgICAgIH07IC8vIEF0dGVtcHQgdG8gaHlkcmF0ZSBpbnN0YW5jZSBmcm9tIERPTVxuXG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gb3duZXJEb2N1bWVudC5xdWVyeVNlbGVjdG9yKGdldFN0eWxlc2hlZXRTZWxlY3RvckZyb21LZXkoa2V5KSk7XG5cbiAgICAgICAgICBpZiAoaW5zdGFuY2UpIHtcbiAgICAgICAgICAgIHN0YXRlLmxvYWRpbmcgPSBMb2FkZWQ7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIENvbnN0cnVjdCBhIG5ldyBpbnN0YW5jZSBhbmQgaW5zZXJ0IGl0XG4gICAgICAgICAgICB2YXIgc3R5bGVzaGVldFByb3BzID0gc3R5bGVzaGVldFByb3BzRnJvbVByZWluaXRPcHRpb25zKGhyZWYsIHByZWNlZGVuY2UsIG9wdGlvbnMpO1xuICAgICAgICAgICAgdmFyIHByZWxvYWRQcm9wcyA9IHByZWxvYWRQcm9wc01hcC5nZXQoa2V5KTtcblxuICAgICAgICAgICAgaWYgKHByZWxvYWRQcm9wcykge1xuICAgICAgICAgICAgICBhZG9wdFByZWxvYWRQcm9wc0ZvclN0eWxlc2hlZXQoc3R5bGVzaGVldFByb3BzLCBwcmVsb2FkUHJvcHMpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbGluayA9IGluc3RhbmNlID0gb3duZXJEb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7XG4gICAgICAgICAgICBtYXJrTm9kZUFzSG9pc3RhYmxlKGxpbmspO1xuICAgICAgICAgICAgc2V0SW5pdGlhbFByb3BlcnRpZXMobGluaywgJ2xpbmsnLCBzdHlsZXNoZWV0UHJvcHMpO1xuICAgICAgICAgICAgbGluay5fcCA9IG5ldyBQcm9taXNlKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgbGluay5vbmxvYWQgPSByZXNvbHZlO1xuICAgICAgICAgICAgICBsaW5rLm9uZXJyb3IgPSByZWplY3Q7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGxpbmsuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgc3RhdGUubG9hZGluZyB8PSBMb2FkZWQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGxpbmsuYWRkRXZlbnRMaXN0ZW5lcignZXJyb3InLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHN0YXRlLmxvYWRpbmcgfD0gRXJyb3JlZDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgc3RhdGUubG9hZGluZyB8PSBJbnNlcnRlZDtcbiAgICAgICAgICAgIGluc2VydFN0eWxlc2hlZXQoaW5zdGFuY2UsIHByZWNlZGVuY2UsIG93bmVyRG9jdW1lbnQpO1xuICAgICAgICAgIH0gLy8gQ29uc3RydWN0IGEgUmVzb3VyY2UgYW5kIGNhY2hlIGl0XG5cblxuICAgICAgICAgIHJlc291cmNlID0ge1xuICAgICAgICAgICAgdHlwZTogJ3N0eWxlc2hlZXQnLFxuICAgICAgICAgICAgaW5zdGFuY2U6IGluc3RhbmNlLFxuICAgICAgICAgICAgY291bnQ6IDEsXG4gICAgICAgICAgICBzdGF0ZTogc3RhdGVcbiAgICAgICAgICB9O1xuICAgICAgICA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IH1cblxuICAgIGNhc2UgJ3N0eWxlJzpcbiAgICAgIHtcbiAgICAgICAgaWYgKHR5cGVvZiBwZW5kaW5nUHJvcHMucHJlY2VkZW5jZSA9PT0gJ3N0cmluZycgJiYgdHlwZW9mIHBlbmRpbmdQcm9wcy5ocmVmID09PSAnc3RyaW5nJykge1xuICAgICAgICAgIHZhciBrZXkgPSBnZXRTdHlsZUtleShwZW5kaW5nUHJvcHMuaHJlZik7XG4gICAgICAgICAgdmFyIHN0eWxlcyA9IGdldFJlc291cmNlc0Zyb21Sb290KHJlc291cmNlUm9vdCkuaG9pc3RhYmxlU3R5bGVzO1xuICAgICAgICAgIHZhciByZXNvdXJjZSA9IHN0eWxlcy5nZXQoa2V5KTtcblxuICAgICAgICAgIGlmICghcmVzb3VyY2UpIHtcbiAgICAgICAgICAgIHJlc291cmNlID0ge1xuICAgICAgICAgICAgICB0eXBlOiAnc3R5bGUnLFxuICAgICAgICAgICAgICBpbnN0YW5jZTogbnVsbCxcbiAgICAgICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgICAgIHN0YXRlOiBudWxsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgc3R5bGVzLnNldChrZXksIHJlc291cmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gcmVzb3VyY2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6ICd2b2lkJyxcbiAgICAgICAgICBpbnN0YW5jZTogbnVsbCxcbiAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICBzdGF0ZTogbnVsbFxuICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgY2FzZSAnbGluayc6XG4gICAgICB7XG4gICAgICAgIGlmIChwZW5kaW5nUHJvcHMucmVsID09PSAnc3R5bGVzaGVldCcgJiYgdHlwZW9mIHBlbmRpbmdQcm9wcy5ocmVmID09PSAnc3RyaW5nJyAmJiB0eXBlb2YgcGVuZGluZ1Byb3BzLnByZWNlZGVuY2UgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgdmFyIHF1YWxpZmllZFByb3BzID0gcGVuZGluZ1Byb3BzO1xuXG4gICAgICAgICAgdmFyIF9rZXkyID0gZ2V0U3R5bGVLZXkocXVhbGlmaWVkUHJvcHMuaHJlZik7XG5cbiAgICAgICAgICB2YXIgX3N0eWxlcyA9IGdldFJlc291cmNlc0Zyb21Sb290KHJlc291cmNlUm9vdCkuaG9pc3RhYmxlU3R5bGVzO1xuXG4gICAgICAgICAgdmFyIF9yZXNvdXJjZTIgPSBfc3R5bGVzLmdldChfa2V5Mik7XG5cbiAgICAgICAgICBpZiAoIV9yZXNvdXJjZTIpIHtcbiAgICAgICAgICAgIC8vIFdlIGFzc2VydGVkIHRoaXMgYWJvdmUgYnV0IEZsb3cgY2FuJ3QgZmlndXJlIG91dCB0aGF0IHRoZSB0eXBlIHNhdGlzZmllc1xuICAgICAgICAgICAgdmFyIG93bmVyRG9jdW1lbnQgPSBnZXREb2N1bWVudEZyb21Sb290KHJlc291cmNlUm9vdCk7XG4gICAgICAgICAgICBfcmVzb3VyY2UyID0ge1xuICAgICAgICAgICAgICB0eXBlOiAnc3R5bGVzaGVldCcsXG4gICAgICAgICAgICAgIGluc3RhbmNlOiBudWxsLFxuICAgICAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICAgICAgc3RhdGU6IHtcbiAgICAgICAgICAgICAgICBsb2FkaW5nOiBOb3RMb2FkZWQsXG4gICAgICAgICAgICAgICAgcHJlbG9hZDogbnVsbFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBfc3R5bGVzLnNldChfa2V5MiwgX3Jlc291cmNlMik7XG5cbiAgICAgICAgICAgIGlmICghcHJlbG9hZFByb3BzTWFwLmhhcyhfa2V5MikpIHtcbiAgICAgICAgICAgICAgcHJlbG9hZFN0eWxlc2hlZXQob3duZXJEb2N1bWVudCwgX2tleTIsIHByZWxvYWRQcm9wc0Zyb21TdHlsZXNoZWV0KHF1YWxpZmllZFByb3BzKSwgX3Jlc291cmNlMi5zdGF0ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIF9yZXNvdXJjZTI7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cblxuICAgIGNhc2UgJ3NjcmlwdCc6XG4gICAgICB7XG4gICAgICAgIGlmICh0eXBlb2YgcGVuZGluZ1Byb3BzLnNyYyA9PT0gJ3N0cmluZycgJiYgcGVuZGluZ1Byb3BzLmFzeW5jID09PSB0cnVlKSB7XG4gICAgICAgICAgdmFyIHNjcmlwdFByb3BzID0gcGVuZGluZ1Byb3BzO1xuXG4gICAgICAgICAgdmFyIF9rZXkzID0gZ2V0U2NyaXB0S2V5KHNjcmlwdFByb3BzLnNyYyk7XG5cbiAgICAgICAgICB2YXIgc2NyaXB0cyA9IGdldFJlc291cmNlc0Zyb21Sb290KHJlc291cmNlUm9vdCkuaG9pc3RhYmxlU2NyaXB0cztcblxuICAgICAgICAgIHZhciBfcmVzb3VyY2UzID0gc2NyaXB0cy5nZXQoX2tleTMpO1xuXG4gICAgICAgICAgaWYgKCFfcmVzb3VyY2UzKSB7XG4gICAgICAgICAgICBfcmVzb3VyY2UzID0ge1xuICAgICAgICAgICAgICB0eXBlOiAnc2NyaXB0JyxcbiAgICAgICAgICAgICAgaW5zdGFuY2U6IG51bGwsXG4gICAgICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgICAgICBzdGF0ZTogbnVsbFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHNjcmlwdHMuc2V0KF9rZXkzLCBfcmVzb3VyY2UzKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gX3Jlc291cmNlMztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdHlwZTogJ3ZvaWQnLFxuICAgICAgICAgIGluc3R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9kZS5nZXRBdHRyaWJ1dGUoJ2Nyb3Nzb3JpZ2luJykgIT09IChwcm9wcy5jcm9zc09yaWdpbiA9PSBudWxsID8gbnVsbCA6IHByb3BzLmNyb3NzT3JpZ2luKSkge1xuICAgICAgICAgICAgICAvLyBtaXNtYXRjaCwgdHJ5IHRoZSBuZXh0IG5vZGU7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpbnN0YW5jZSA9IG5vZGU7XG4gICAgICAgICAgICBub2Rlcy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICBicmVhayBnZXRJbnN0YW5jZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0YW5jZSA9IG93bmVyRG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0eXBlKTtcbiAgICAgICAgc2V0SW5pdGlhbFByb3BlcnRpZXMoaW5zdGFuY2UsIHR5cGUsIHByb3BzKTtcbiAgICAgICAgb3duZXJEb2N1bWVudC5oZWFkLmFwcGVuZENoaWxkKGluc3RhbmNlKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlICdtZXRhJzpcbiAgICAgIHtcbiAgICAgICAgdmFyIF9jYWNoZSA9IGdldEh5ZHJhdGFibGVIb2lzdGFibGVDYWNoZSgnbWV0YScsICdjb250ZW50Jywgb3duZXJEb2N1bWVudCk7XG5cbiAgICAgICAgdmFyIF9rZXk1ID0gdHlwZSArIChwcm9wcy5jb250ZW50IHx8ICcnKTtcblxuICAgICAgICB2YXIgX21heWJlTm9kZXMgPSBfY2FjaGUuZ2V0KF9rZXk1KTtcblxuICAgICAgICBpZiAoX21heWJlTm9kZXMpIHtcbiAgICAgICAgICB2YXIgX25vZGVzID0gX21heWJlTm9kZXM7XG5cbiAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgX25vZGVzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgdmFyIF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cy5ocmVmID09PSAnJykge1xuICAgICAgICAgICAgICAgIGVycm9yKCdDYW5ub3QgcmVuZGVyIGEgPGxpbms+IG91dHNpZGUgdGhlIG1haW4gZG9jdW1lbnQgd2l0aG91dCBhIGByZWxgIGFuZCBgaHJlZmAgcHJvcC4nICsgJyBUcnkgYWRkaW5nIGEgYHJlbGAgYW5kL29yIGBocmVmYCBwcm9wIHRvIHRoaXMgPGxpbms+IG9yIG1vdmluZyB0aGUgbGluayBpbnRvIHRoZSA8aGVhZD4gdGFnJyk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAocHJvcHMub25FcnJvciB8fCBwcm9wcy5vbkxvYWQpIHtcbiAgICAgICAgICAgICAgICBlcnJvcignQ2Fubm90IHJlbmRlciBhIDxsaW5rPiB3aXRoIG9uTG9hZCBvciBvbkVycm9yIGxpc3RlbmVycyBvdXRzaWRlIHRoZSBtYWluIGRvY3VtZW50LicgKyAnIFRyeSByZW1vdmluZyBvbkxvYWQ9ey4uLn0gYW5kIG9uRXJyb3I9ey4uLn0gb3IgbW92aW5nIGl0IGludG8gdGhlIHJvb3QgPGhlYWQ+IHRhZyBvcicgKyAnIHNvbWV3aGVyZSBpbiB0aGUgPGJvZHk+LicpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgc3dpdGNoIChwcm9wcy5yZWwpIHtcbiAgICAgICAgICBjYXNlICdzdHlsZXNoZWV0JzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIHByZWNlZGVuY2UgPSBwcm9wcy5wcmVjZWRlbmNlLFxuICAgICAgICAgICAgICAgICAgZGlzYWJsZWQgPSBwcm9wcy5kaXNhYmxlZDtcblxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwcmVjZWRlbmNlICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgaWYgKG91dHNpZGVIb3N0Q29udGFpbmVyQ29udGV4dCkge1xuICAgICAgICAgICAgICAgICAgICBlcnJvcignQ2Fubm90IHJlbmRlciBhIDxsaW5rIHJlbD1cInN0eWxlc2hlZXRcIiAvPiBvdXRzaWRlIHRoZSBtYWluIGRvY3VtZW50IHdpdGhvdXQga25vd2luZyBpdHMgcHJlY2VkZW5jZS4nICsgJyBDb25zaWRlciBhZGRpbmcgcHJlY2VkZW5jZT1cImRlZmF1bHRcIiBvciBtb3ZpbmcgaXQgaW50byB0aGUgcm9vdCA8aGVhZD4gdGFnLicpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiB0eXBlb2YgcHJlY2VkZW5jZSA9PT0gJ3N0cmluZycgJiYgZGlzYWJsZWQgPT0gbnVsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICBjYXNlICdzY3JpcHQnOlxuICAgICAge1xuICAgICAgICBpZiAocHJvcHMuYXN5bmMgIT09IHRydWUgfHwgcHJvcHMub25Mb2FkIHx8IHByb3BzLm9uRXJyb3IgfHwgdHlwZW9mIHByb3BzLnNyYyAhPT0gJ3N0cmluZycgfHwgIXByb3BzLnNyYykge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChvdXRzaWRlSG9zdENvbnRhaW5lckNvbnRleHQpIHtcbiAgICAgICAgICAgICAgaWYgKHByb3BzLmFzeW5jICE9PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgZXJyb3IoJ0Nhbm5vdCByZW5kZXIgYSBzeW5jIG9yIGRlZmVyIDxzY3JpcHQ+IG91dHNpZGUgdGhlIG1haW4gZG9jdW1lbnQgd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dGFibGVfcmVuZGVyU3VidHJlZUludG9Db250YWluZXIgPSByZW5kZXJTdWJ0cmVlSW50b0NvbnRhaW5lcjtcbmV4cG9ydHMudmVyc2lvbiA9IFJlYWN0VmVyc2lvbjtcbiAgICAgICAgICAvKiBnbG9iYWwgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fICovXG5pZiAoXG4gIHR5cGVvZiBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18gIT09ICd1bmRlZmluZWQnICYmXG4gIHR5cGVvZiBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18ucmVnaXN0ZXJJbnRlcm5hbE1vZHVsZVN0b3AgPT09XG4gICAgJ2Z1bmN0aW9uJ1xuKSB7XG4gIF9fUkVBQ1RfREVWVE9PTFNfR0xPQkFMX0hPT0tfXy5yZWdpc3RlckludGVybmFsTW9kdWxlU3RvcChuZXcgRXJyb3IoKSk7XG59XG4gICAgICAgIFxuICB9KSgpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-dom/client.js": /*!*************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-dom/client.js ***! \*************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nvar m = __webpack_require__(/*! react-dom */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/index.js\");\nif (false) {} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function (c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function (c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i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mV0dXJuIG0uY3JlYXRlUm9vdChjLCBvKTtcbiAgICB9IGZpbmFsbHkge1xuICAgICAgaS51c2luZ0NsaWVudEVudHJ5UG9pbnQgPSBmYWxzZTtcbiAgICB9XG4gIH07XG4gIGV4cG9ydHMuaHlkcmF0ZVJvb3QgPSBmdW5jdGlvbiAoYywgaCwgbykge1xuICAgIGkudXNpbmdDbGllbnRFbnRyeVBvaW50ID0gdHJ1ZTtcbiAgICB0cnkge1xuICAgICAgcmV0dXJuIG0uaHlkcmF0ZVJvb3QoYywgaCwgbyk7XG4gICAgfSBmaW5hbGx5IHtcbiAgICAgIGkudXNpbmdDbGllbnRFbnRyeVBvaW50ID0gZmFsc2U7XG4gICAgfVxuICB9O1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-dom/client.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-dom/index.js": /*!************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-dom/index.js ***! \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1kb20vaW5kZXguanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU0sSUFBcUM7QUFDM0M7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsSUFBSSxLQUFxQyxFQUFFLEVBSzFDLENBQUM7QUFDRixFQUFFLG1LQUEwRDtBQUM1RCIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LWRvbS9pbmRleC5qcz9kY2M2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuZnVuY3Rpb24gY2hlY2tEQ0UoKSB7XG4gIC8qIGdsb2JhbCBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18gKi9cbiAgaWYgKFxuICAgIHR5cGVvZiBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18gPT09ICd1bmRlZmluZWQnIHx8XG4gICAgdHlwZW9mIF9fUkVBQ1RfREVWVE9PTFNfR0xPQkFMX0hPT0tfXy5jaGVja0RDRSAhPT0gJ2Z1bmN0aW9uJ1xuICApIHtcbiAgICByZXR1cm47XG4gIH1cbiAgaWYgKHByb2Nlc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cbn1cblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgLy8gRENFIGNoZWNrIHNob3VsZCBoYXBwZW4gYmVmb3JlIFJlYWN0RE9NIGJ1bmRsZSBleGVjdXRlcyBzbyB0aGF0XG4gIC8vIERldlRvb2xzIGNhbiByZXBvcnQgYmFkIG1pbmlmaWNhdGlvbiBkdXJpbmcgaW5qZWN0aW9uLlxuICBjaGVja0RDRSgpO1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LWRvbS5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1kb20uZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-dom/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js": /*!************************************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js ***! \************************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * @license React\n * react-refresh-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// ATTENTION\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations.\n// It's OK to reference families, but use WeakMap/Set for types.\n\nvar allFamiliesByID = new Map();\nvar allFamiliesByType = new PossiblyWeakMap();\nvar allSignaturesByType = new PossiblyWeakMap(); // This WeakMap is read by React, so we only put families\n// that have actually been edited here. This keeps checks fast.\n// $FlowIssue\n\nvar updatedFamiliesByType = new PossiblyWeakMap(); // This is cleared on every performReactRefresh() call.\n// It is an array of [Family, NextType] tuples.\n\nvar pendingUpdates = []; // This is injected by the renderer via DevTools global hook.\n\nvar helpersByRendererID = new Map();\nvar helpersByRoot = new Map(); // We keep track of mounted roots so we can schedule updates.\n\nvar mountedRoots = new Set(); // If a root captures an error, we remember it so we can retry on edit.\n\nvar failedRoots = new Set(); // In environments that support WeakMap, we also remember the last element for every root.\n// It needs to be weak because we do this even for roots that failed to mount.\n// If there is no WeakMap, we won't attempt to do retrying.\n// $FlowIssue\n\nvar rootElements = // $FlowIssue\ntypeof WeakMap === 'function' ? new WeakMap() : null;\nvar isPerformingRefresh = false;\n\nfunction computeFullKey(signature) {\n if (signature.fullKey !== null) {\n return signature.fullKey;\n }\n\n var fullKey = signature.ownKey;\n var hooks;\n\n try {\n hooks = signature.getCustomHooks();\n } catch (err) {\n // This can happen in an edge case, e.g. if expression like Foo.useSomething\n // depends on Foo which is lazily initialized during rendering.\n // In that case just assume we'll have to remount.\n signature.forceReset = true;\n signature.fullKey = fullKey;\n return fullKey;\n }\n\n for (var i = 0; i < hooks.length; i++) {\n var hook = hooks[i];\n\n if (typeof hook !== 'function') {\n // Something's wrong. Assume we need to remount.\n signature.forceReset = true;\n signature.fullKey = fullKey;\n return fullKey;\n }\n\n var nestedHookSignature = allSignaturesByType.get(hook);\n\n if (nestedHookSignature === undefined) {\n // No signature means Hook wasn't in the source code, e.g. in a library.\n // We'll skip it because we can assume it won't change during this session.\n continue;\n }\n\n var nestedHookKey = computeFullKey(nestedHookSignature);\n\n if (nestedHookSignature.forceReset) {\n signature.forceReset = true;\n }\n\n fullKey += '\\n---\\n' + nestedHookKey;\n }\n\n signature.fullKey = fullKey;\n return fullKey;\n}\n\nfunction haveEqualSignatures(prevType, nextType) {\n var prevSignature = allSignaturesByType.get(prevType);\n var nextSignature = allSignaturesByType.get(nextType);\n\n if (prevSignature === undefined && nextSignature === undefined) {\n return true;\n }\n\n if (prevSignature === undefined || nextSignature === undefined) {\n return false;\n }\n\n if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {\n return false;\n }\n\n if (nextSignature.forceReset) {\n return false;\n }\n\n return true;\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction canPreserveStateBetween(prevType, nextType) {\n if (isReactClass(prevType) || isReactClass(nextType)) {\n return false;\n }\n\n if (haveEqualSignatures(prevType, nextType)) {\n return true;\n }\n\n return false;\n}\n\nfunction resolveFamily(type) {\n // Only check updated types to keep lookups fast.\n return updatedFamiliesByType.get(type);\n} // If we didn't care about IE11, we could use new Map/Set(iterable).\n\n\nfunction cloneMap(map) {\n var clone = new Map();\n map.forEach(function (value, key) {\n clone.set(key, value);\n });\n return clone;\n}\n\nfunction cloneSet(set) {\n var clone = new Set();\n set.forEach(function (value) {\n clone.add(value);\n });\n return clone;\n} // This is a safety mechanism to protect against rogue getters and Proxies.\n\n\nfunction getProperty(object, property) {\n try {\n return object[property];\n } catch (err) {\n // Intentionally ignore.\n return undefined;\n }\n}\n\nfunction performReactRefresh() {\n\n if (pendingUpdates.length === 0) {\n return null;\n }\n\n if (isPerformingRefresh) {\n return null;\n }\n\n isPerformingRefresh = true;\n\n try {\n var staleFamilies = new Set();\n var updatedFamilies = new Set();\n var updates = pendingUpdates;\n pendingUpdates = [];\n updates.forEach(function (_ref) {\n var family = _ref[0],\n nextType = _ref[1];\n // Now that we got a real edit, we can create associations\n // that will be read by the React reconciler.\n var prevType = family.current;\n updatedFamiliesByType.set(prevType, family);\n updatedFamiliesByType.set(nextType, family);\n family.current = nextType; // Determine whether this should be a re-render or a re-mount.\n\n if (canPreserveStateBetween(prevType, nextType)) {\n updatedFamilies.add(family);\n } else {\n staleFamilies.add(family);\n }\n }); // TODO: rename these fields to something more meaningful.\n\n var update = {\n updatedFamilies: updatedFamilies,\n // Families that will re-render preserving state\n staleFamilies: staleFamilies // Families that will be remounted\n\n };\n helpersByRendererID.forEach(function (helpers) {\n // Even if there are no roots, set the handler on first update.\n // This ensures that if *new* roots are mounted, they'll use the resolve handler.\n helpers.setRefreshHandler(resolveFamily);\n });\n var didError = false;\n var firstError = null; // We snapshot maps and sets that are mutated during commits.\n // If we don't do this, there is a risk they will be mutated while\n // we iterate over them. For example, trying to recover a failed root\n // may cause another root to be added to the failed list -- an infinite loop.\n\n var failedRootsSnapshot = cloneSet(failedRoots);\n var mountedRootsSnapshot = cloneSet(mountedRoots);\n var helpersByRootSnapshot = cloneMap(helpersByRoot);\n failedRootsSnapshot.forEach(function (root) {\n var helpers = helpersByRootSnapshot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n if (!failedRoots.has(root)) {// No longer failed.\n }\n\n if (rootElements === null) {\n return;\n }\n\n if (!rootElements.has(root)) {\n return;\n }\n\n var element = rootElements.get(root);\n\n try {\n helpers.scheduleRoot(root, element);\n } catch (err) {\n if (!didError) {\n didError = true;\n firstError = err;\n } // Keep trying other roots.\n\n }\n });\n mountedRootsSnapshot.forEach(function (root) {\n var helpers = helpersByRootSnapshot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n if (!mountedRoots.has(root)) {// No longer mounted.\n }\n\n try {\n helpers.scheduleRefresh(root, update);\n } catch (err) {\n if (!didError) {\n didError = true;\n firstError = err;\n } // Keep trying other roots.\n\n }\n });\n\n if (didError) {\n throw firstError;\n }\n\n return update;\n } finally {\n isPerformingRefresh = false;\n }\n}\nfunction register(type, id) {\n {\n if (type === null) {\n return;\n }\n\n if (typeof type !== 'function' && typeof type !== 'object') {\n return;\n } // This can happen in an edge case, e.g. if we register\n // return value of a HOC but it returns a cached component.\n // Ignore anything but the first registration for each type.\n\n\n if (allFamiliesByType.has(type)) {\n return;\n } // Create family or remember to update it.\n // None of this bookkeeping affects reconciliation\n // until the first performReactRefresh() call above.\n\n\n var family = allFamiliesByID.get(id);\n\n if (family === undefined) {\n family = {\n current: type\n };\n allFamiliesByID.set(id, family);\n } else {\n pendingUpdates.push([family, type]);\n }\n\n allFamiliesByType.set(type, family); // Visit inner types because we might not have registered them.\n\n if (typeof type === 'object' && type !== null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n register(type.render, id + '$render');\n break;\n\n case REACT_MEMO_TYPE:\n register(type.type, id + '$type');\n break;\n }\n }\n }\n}\nfunction setSignature(type, key) {\n var forceReset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var getCustomHooks = arguments.length > 3 ? arguments[3] : undefined;\n\n {\n if (!allSignaturesByType.has(type)) {\n allSignaturesByType.set(type, {\n forceReset: forceReset,\n ownKey: key,\n fullKey: null,\n getCustomHooks: getCustomHooks || function () {\n return [];\n }\n });\n } // Visit inner types because we might not have signed them.\n\n\n if (typeof type === 'object' && type !== null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n setSignature(type.render, key, forceReset, getCustomHooks);\n break;\n\n case REACT_MEMO_TYPE:\n setSignature(type.type, key, forceReset, getCustomHooks);\n break;\n }\n }\n }\n} // This is lazily called during first render for a type.\n// It captures Hook list at that time so inline requires don't break comparisons.\n\nfunction collectCustomHooksForSignature(type) {\n {\n var signature = allSignaturesByType.get(type);\n\n if (signature !== undefined) {\n computeFullKey(signature);\n }\n }\n}\nfunction getFamilyByID(id) {\n {\n return allFamiliesByID.get(id);\n }\n}\nfunction getFamilyByType(type) {\n {\n return allFamiliesByType.get(type);\n }\n}\nfunction findAffectedHostInstances(families) {\n {\n var affectedInstances = new Set();\n mountedRoots.forEach(function (root) {\n var helpers = helpersByRoot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n var instancesForRoot = helpers.findHostInstancesForRefresh(root, families);\n instancesForRoot.forEach(function (inst) {\n affectedInstances.add(inst);\n });\n });\n return affectedInstances;\n }\n}\nfunction injectIntoGlobalHook(globalObject) {\n {\n // For React Native, the global hook will be set up by require('react-devtools-core').\n // That code will run before us. So we need to monkeypatch functions on existing hook.\n // For React Web, the global hook will be set up by the extension.\n // This will also run before us.\n var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook === undefined) {\n // However, if there is no DevTools extension, we'll need to set up the global hook ourselves.\n // Note that in this case it's important that renderer code runs *after* this method call.\n // Otherwise, the renderer will think that there is no global hook, and won't do the injection.\n var nextID = 0;\n globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {\n renderers: new Map(),\n supportsFiber: true,\n inject: function (injected) {\n return nextID++;\n },\n onScheduleFiberRoot: function (id, root, children) {},\n onCommitFiberRoot: function (id, root, maybePriorityLevel, didError) {},\n onCommitFiberUnmount: function () {}\n };\n }\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // Using console['warn'] to evade Babel and ESLint\n console['warn']('Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + 'Fast Refresh is not compatible with this shim and will be disabled.');\n return;\n } // Here, we just want to get a reference to scheduleRefresh.\n\n\n var oldInject = hook.inject;\n\n hook.inject = function (injected) {\n var id = oldInject.apply(this, arguments);\n\n if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {\n // This version supports React Refresh.\n helpersByRendererID.set(id, injected);\n }\n\n return id;\n }; // Do the same for any already injected roots.\n // This is useful if ReactDOM has already been initialized.\n // https://github.com/facebook/react/issues/17626\n\n\n hook.renderers.forEach(function (injected, id) {\n if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {\n // This version supports React Refresh.\n helpersByRendererID.set(id, injected);\n }\n }); // We also want to track currently mounted roots.\n\n var oldOnCommitFiberRoot = hook.onCommitFiberRoot;\n\n var oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function () {};\n\n hook.onScheduleFiberRoot = function (id, root, children) {\n if (!isPerformingRefresh) {\n // If it was intentionally scheduled, don't attempt to restore.\n // This includes intentionally scheduled unmounts.\n failedRoots.delete(root);\n\n if (rootElements !== null) {\n rootElements.set(root, children);\n }\n }\n\n return oldOnScheduleFiberRoot.apply(this, arguments);\n };\n\n hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {\n var helpers = helpersByRendererID.get(id);\n\n if (helpers !== undefined) {\n helpersByRoot.set(root, helpers);\n var current = root.current;\n var alternate = current.alternate; // We need to determine whether this root has just (un)mounted.\n // This logic is copy-pasted from similar logic in the DevTools backend.\n // If this breaks with some refactoring, you'll want to update DevTools too.\n\n if (alternate !== null) {\n var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root);\n var isMounted = current.memoizedState != null && current.memoizedState.element != null;\n\n if (!wasMounted && isMounted) {\n // Mount a new root.\n mountedRoots.add(root);\n failedRoots.delete(root);\n } else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) {\n // Unmount an existing root.\n mountedRoots.delete(root);\n\n if (didError) {\n // We'll remount it on future edits.\n failedRoots.add(root);\n } else {\n helpersByRoot.delete(root);\n }\n } else if (!wasMounted && !isMounted) {\n if (didError) {\n // We'll remount it on future edits.\n failedRoots.add(root);\n }\n }\n } else {\n // Mount a new root.\n mountedRoots.add(root);\n }\n } // Always call the decorated DevTools hook.\n\n\n return oldOnCommitFiberRoot.apply(this, arguments);\n };\n }\n}\nfunction hasUnrecoverableErrors() {\n // TODO: delete this after removing dependency in RN.\n return false;\n} // Exposed for testing.\n\nfunction _getMountedRootCount() {\n {\n return mountedRoots.size;\n }\n} // This is a wrapper over more primitive functions for setting signature.\n// Signatures let us decide whether the Hook order has changed on refresh.\n//\n// This function is intended to be used as a transform target, e.g.:\n// var _s = createSignatureFunctionForTransform()\n//\n// function Hello() {\n// const [foo, setFoo] = useState(0);\n// const value = useCustomHook();\n// _s(); /* Call without arguments triggers collecting the custom Hook list.\n// * This doesn't happen during the module evaluation because we\n// * don't want to change the module order with inline requires.\n// * Next calls are noops. */\n// return <h1>Hi</h1>;\n// }\n//\n// /* Call with arguments attaches the signature to the type: */\n// _s(\n// Hello,\n// 'useState{[foo, setFoo]}(0)',\n// () => [useCustomHook], /* Lazy to avoid triggering inline requires */\n// );\n\nfunction createSignatureFunctionForTransform() {\n {\n var savedType;\n var hasCustomHooks;\n var didCollectHooks = false;\n return function (type, key, forceReset, getCustomHooks) {\n if (typeof key === 'string') {\n // We're in the initial phase that associates signatures\n // with the functions. Note this may be called multiple times\n // in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).\n if (!savedType) {\n // We're in the innermost call, so this is the actual type.\n savedType = type;\n hasCustomHooks = typeof getCustomHooks === 'function';\n } // Set the signature for all types (even wrappers!) in case\n // they have no signatures of their own. This is to prevent\n // problems like https://github.com/facebook/react/issues/20417.\n\n\n if (type != null && (typeof type === 'function' || typeof type === 'object')) {\n setSignature(type, key, forceReset, getCustomHooks);\n }\n\n return type;\n } else {\n // We're in the _s() call without arguments, which means\n // this is the time to collect custom Hook signatures.\n // Only do this once. This path is hot and runs *inside* every render!\n if (!didCollectHooks && hasCustomHooks) {\n didCollectHooks = true;\n collectCustomHooksForSignature(savedType);\n }\n }\n };\n }\n}\nfunction isLikelyComponentType(type) {\n {\n switch (typeof type) {\n case 'function':\n {\n // First, deal with classes.\n if (type.prototype != null) {\n if (type.prototype.isReactComponent) {\n // React class.\n return true;\n }\n\n var ownNames = Object.getOwnPropertyNames(type.prototype);\n\n if (ownNames.length > 1 || ownNames[0] !== 'constructor') {\n // This looks like a class.\n return false;\n } // eslint-disable-next-line no-proto\n\n\n if (type.prototype.__proto__ !== Object.prototype) {\n // It has a superclass.\n return false;\n } // Pass through.\n // This looks like a regular function with empty prototype.\n\n } // For plain functions and arrows, use name as a heuristic.\n\n\n var name = type.name || type.displayName;\n return typeof name === 'string' && /^[A-Z]/.test(name);\n }\n\n case 'object':\n {\n if (type != null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n case REACT_MEMO_TYPE:\n // Definitely React components.\n return true;\n\n default:\n return false;\n }\n }\n\n return false;\n }\n\n default:\n {\n return false;\n }\n }\n }\n}\n\nexports._getMountedRootCount = _getMountedRootCount;\nexports.collectCustomHooksForSignature = collectCustomHooksForSignature;\nexports.createSignatureFunctionForTransform = createSignatureFunctionForTransform;\nexports.findAffectedHostInstances = findAffectedHostInstances;\nexports.getFamilyByID = getFamilyByID;\nexports.getFamilyByType = getFamilyByType;\nexports.hasUnrecoverableErrors = hasUnrecoverableErrors;\nexports.injectIntoGlobalHook = injectIntoGlobalHook;\nexports.isLikelyComponentType = isLikelyComponentType;\nexports.performReactRefresh = performReactRefresh;\nexports.register = register;\nexports.setSignature = setSignature;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1yZWZyZXNoL2Nqcy9yZWFjdC1yZWZyZXNoLXJ1bnRpbWUuZGV2ZWxvcG1lbnQuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVhOztBQUViLElBQUksSUFBcUM7QUFDekM7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUEscUVBQXFFO0FBQ3JFOztBQUVBO0FBQ0E7QUFDQSxpREFBaUQ7QUFDakQ7QUFDQTs7QUFFQSxtREFBbUQ7QUFDbkQ7O0FBRUEseUJBQXlCOztBQUV6QjtBQUNBLCtCQUErQjs7QUFFL0IsOEJBQThCOztBQUU5Qiw2QkFBNkI7QUFDN0I7QUFDQTtBQUNBOztBQUVBO0F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tZW50ICE9IG51bGwgJiYgbW91bnRlZFJvb3RzLmhhcyhyb290KTtcbiAgICAgICAgICB2YXIgaXNNb3VudGVkID0gY3VycmVudC5tZW1vaXplZFN0YXRlICE9IG51bGwgJiYgY3VycmVudC5tZW1vaXplZFN0YXRlLmVsZW1lbnQgIT0gbnVsbDtcblxuICAgICAgICAgIGlmICghd2FzTW91bnRlZCAmJiBpc01vdW50ZWQpIHtcbiAgICAgICAgICAgIC8vIE1vdW50IGEgbmV3IHJvb3QuXG4gICAgICAgICAgICBtb3VudGVkUm9vdHMuYWRkKHJvb3QpO1xuICAgICAgICAgICAgZmFpbGVkUm9vdHMuZGVsZXRlKHJvb3QpO1xuICAgICAgICAgIH0gZWxzZSBpZiAod2FzTW91bnRlZCAmJiBpc01vdW50ZWQpIDsgZWxzZSBpZiAod2FzTW91bnRlZCAmJiAhaXNNb3VudGVkKSB7XG4gICAgICAgICAgICAvLyBVbm1vdW50IGFuIGV4aXN0aW5nIHJvb3QuXG4gICAgICAgICAgICBtb3VudGVkUm9vdHMuZGVsZXRlKHJvb3QpO1xuXG4gICAgICAgICAgICBpZiAoZGlkRXJyb3IpIHtcbiAgICAgICAgICAgICAgLy8gV2UnbGwgcmVtb3VudCBpdCBvbiBmdXR1cmUgZWRpdHMuXG4gICAgICAgICAgICAgIGZhaWxlZFJvb3RzLmFkZChyb290KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGhlbHBlcnNCeVJvb3QuZGVsZXRlKHJvb3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoIXdhc01vdW50ZWQgJiYgIWlzTW91bnRlZCkge1xuICAgICAgICAgICAgaWYgKGRpZEVycm9yKSB7XG4gICAgICAgICAgICAgIC8vIFdlJ2xsIHJlbW91bnQgaXQgb24gZnV0dXJlIGVkaXRzLlxuICAgICAgICAgICAgICBmYWlsZWRSb290cy5hZGQocm9vdCk7XG4gICAgICAgICAgICB9XG4gICAgIC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jtcbmV4cG9ydHMuc2V0U2lnbmF0dXJlID0gc2V0U2lnbmF0dXJlO1xuICB9KSgpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-refresh/runtime.js": /*!******************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-refresh/runtime.js ***! \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-refresh-runtime.development.js */ \"(app-client)/./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1yZWZyZXNoL3J1bnRpbWUuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsSUFBSSxLQUFxQyxFQUFFLEVBRTFDLENBQUM7QUFDRixFQUFFLCtMQUFzRTtBQUN4RSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LXJlZnJlc2gvcnVudGltZS5qcz9kZGJhIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1yZWZyZXNoLXJ1bnRpbWUucHJvZHVjdGlvbi5taW4uanMnKTtcbn0gZWxzZSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvcmVhY3QtcmVmcmVzaC1ydW50aW1lLmRldmVsb3BtZW50LmpzJyk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-refresh/runtime.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js": /*!*****************************************************************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js ***! \*****************************************************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * @license React\n * react-server-dom-webpack-client.browser.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar ReactDOM = __webpack_require__(/*! react-dom */ \"(app-client)/./node_modules/next/dist/compiled/react-dom/index.js\");\nvar React = __webpack_require__(/*! react */ \"(app-client)/./node_modules/next/dist/compiled/react/index.js\");\n\n// -----------------------------------------------------------------------------\nvar enableBinaryFlight = false;\n\nfunction createStringDecoder() {\n return new TextDecoder();\n}\nvar decoderOptions = {\n stream: true\n};\nfunction readPartialStringChunk(decoder, buffer) {\n return decoder.decode(buffer, decoderOptions);\n}\nfunction readFinalStringChunk(decoder, buffer) {\n return decoder.decode(buffer);\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction resolveClientReference(bundlerConfig, metadata) {\n if (bundlerConfig) {\n var moduleExports = bundlerConfig[metadata.id];\n var resolvedModuleData = moduleExports[metadata.name];\n var name;\n\n if (resolvedModuleData) {\n // The potentially aliased name.\n name = resolvedModuleData.name;\n } else {\n // If we don't have this specific name, we might have the full module.\n resolvedModuleData = moduleExports['*'];\n\n if (!resolvedModuleData) {\n throw new Error('Could not find the module \"' + metadata.id + '\" in the React SSR Manifest. ' + 'This is probably a bug in the React Server Components bundler.');\n }\n\n name = metadata.name;\n }\n\n return {\n id: resolvedModuleData.id,\n chunks: resolvedModuleData.chunks,\n name: name,\n async: !!metadata.async\n };\n }\n\n return metadata;\n}\n// If they're still pending they're a thenable. This map also exists\n// in Webpack but unfortunately it's not exposed so we have to\n// replicate it in user space. null means that it has already loaded.\n\nvar chunkCache = new Map();\n\nfunction requireAsyncModule(id) {\n // We've already loaded all the chunks. We can require the module.\n var promise = globalThis.__next_require__(id);\n\n if (typeof promise.then !== 'function') {\n // This wasn't a promise after all.\n return null;\n } else if (promise.status === 'fulfilled') {\n // This module was already resolved earlier.\n return null;\n } else {\n // Instrument the Promise to stash the result.\n promise.then(function (value) {\n var fulfilledThenable = promise;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = value;\n }, function (reason) {\n var rejectedThenable = promise;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = reason;\n });\n return promise;\n }\n}\n\nfunction ignoreReject() {// We rely on rejected promises to be handled by another listener.\n} // Start preloading the modules since we might need them soon.\n// This function doesn't suspend.\n\n\nfunction preloadModule(metadata) {\n var chunks = metadata.chunks;\n var promises = [];\n\n for (var i = 0; i < chunks.length; i++) {\n var chunkId = chunks[i];\n var entry = chunkCache.get(chunkId);\n\n if (entry === undefined) {\n var thenable = globalThis.__next_chunk_load__(chunkId);\n\n promises.push(thenable); // $FlowFixMe[method-unbinding]\n\n var resolve = chunkCache.set.bind(chunkCache, chunkId, null);\n thenable.then(resolve, ignoreReject);\n chunkCache.set(chunkId, thenable);\n } else if (entry !== null) {\n promises.push(entry);\n }\n }\n\n if (metadata.async) {\n if (promises.length === 0) {\n return requireAsyncModule(metadata.id);\n } else {\n return Promise.all(promises).then(function () {\n return requireAsyncModule(metadata.id);\n });\n }\n } else if (promises.length > 0) {\n return Promise.all(promises);\n } else {\n return null;\n }\n} // Actually require the module or suspend if it's not yet ready.\n// Increase priority if necessary.\n\nfunction requireModule(metadata) {\n var moduleExports = globalThis.__next_require__(metadata.id);\n\n if (metadata.async) {\n if (typeof moduleExports.then !== 'function') ; else if (moduleExports.status === 'fulfilled') {\n // This Promise should've been instrumented by preloadModule.\n moduleExports = moduleExports.value;\n } else {\n throw moduleExports.reason;\n }\n }\n\n if (metadata.name === '*') {\n // This is a placeholder value that represents that the caller imported this\n // as a CommonJS module as is.\n return moduleExports;\n }\n\n if (metadata.name === '') {\n // This is a placeholder value that represents that the caller accessed the\n // default property of this if it was an ESM interop module.\n return moduleExports.__esModule ? moduleExports.default : moduleExports;\n }\n\n return moduleExports[metadata.name];\n}\n\nvar ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// This client file is in the shared folder because it applies to both SSR and browser contexts.\nvar ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;\nfunction dispatchHint(code, model) {\n var dispatcher = ReactDOMCurrentDispatcher.current;\n\n if (dispatcher) {\n var href, options;\n\n if (typeof model === 'string') {\n href = model;\n } else {\n href = model[0];\n options = model[1];\n }\n\n switch (code) {\n case 'D':\n {\n // $FlowFixMe[prop-missing] options are not refined to their types by code\n dispatcher.prefetchDNS(href, options);\n return;\n }\n\n case 'C':\n {\n // $FlowFixMe[prop-missing] options are not refined to their types by code\n dispatcher.preconnect(href, options);\n return;\n }\n\n case 'L':\n {\n // $FlowFixMe[prop-missing] options are not refined to their types by code\n // $FlowFixMe[incompatible-call] options are not refined to their types by code\n dispatcher.preload(href, options);\n return;\n }\n\n case 'I':\n {\n // $FlowFixMe[prop-missing] options are not refined to their types by code\n // $FlowFixMe[incompatible-call] options are not refined to their types by code\n dispatcher.preinit(href, options);\n return;\n }\n }\n }\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n// in case they error.\n\nvar jsxPropsParents = new WeakMap();\nvar jsxChildrenParents = new WeakMap();\n\nfunction isObjectPrototype(object) {\n if (!object) {\n return false;\n }\n\n var ObjectPrototype = Object.prototype;\n\n if (object === ObjectPrototype) {\n return true;\n } // It might be an object from a different Realm which is\n // still just a plain simple object.\n\n\n if (Object.getPrototypeOf(object)) {\n return false;\n }\n\n var names = Object.getOwnPropertyNames(object);\n\n for (var i = 0; i < names.length; i++) {\n if (!(names[i] in ObjectPrototype)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isSimpleObject(object) {\n if (!isObjectPrototype(Object.getPrototypeOf(object))) {\n return false;\n }\n\n var names = Object.getOwnPropertyNames(object);\n\n for (var i = 0; i < names.length; i++) {\n var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);\n\n if (!descriptor) {\n return false;\n }\n\n if (!descriptor.enumerable) {\n if ((names[i] === 'key' || names[i] === 'ref') && typeof descriptor.get === 'function') {\n // React adds key and ref getters to props objects to issue warnings.\n // Those getters will not be transferred to the client, but that's ok,\n // so we'll special case them.\n continue;\n }\n\n return false;\n }\n }\n\n return true;\n}\nfunction objectName(object) {\n // $FlowFixMe[method-unbinding]\n var name = Object.prototype.toString.call(object);\n return name.replace(/^\\[object (.*)\\]$/, function (m, p0) {\n return p0;\n });\n}\n\nfunction describeKeyForErrorMessage(key) {\n var encodedKey = JSON.stringify(key);\n return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n}\n\nfunction describeValueForErrorMessage(value) {\n switch (typeof value) {\n case 'string':\n {\n return JSON.stringify(value.length <= 10 ? value : value.slice(0, 10) + '...');\n }\n\n case 'object':\n {\n if (isArray(value)) {\n return '[...]';\n }\n\n var name = objectName(value);\n\n if (name === 'Object') {\n return '{...}';\n }\n\n return name;\n }\n\n case 'function':\n return 'function';\n\n default:\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value);\n }\n}\n\nfunction describeElementType(type) {\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeElementType(type.render);\n\n case REACT_MEMO_TYPE:\n return describeElementType(type.type);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeElementType(init(payload));\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeObjectForErrorMessage(objectOrArray, expandedName) {\n var objKind = objectName(objectOrArray);\n\n if (objKind !== 'Object' && objKind !== 'Array') {\n return objKind;\n }\n\n var str = '';\n var start = -1;\n var length = 0;\n\n if (isArray(objectOrArray)) {\n if (jsxChildrenParents.has(objectOrArray)) {\n // Print JSX Children\n var type = jsxChildrenParents.get(objectOrArray);\n str = '<' + describeElementType(type) + '>';\n var array = objectOrArray;\n\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n var substr = void 0;\n\n if (typeof value === 'string') {\n substr = value;\n } else if (typeof value === 'object' && value !== null) {\n substr = '{' + describeObjectForErrorMessage(value) + '}';\n } else {\n substr = '{' + describeValueForErrorMessage(value) + '}';\n }\n\n if ('' + i === expandedName) {\n start = str.length;\n length = substr.length;\n str += substr;\n } else if (substr.length < 15 && str.length + substr.length < 40) {\n str += substr;\n } else {\n str += '{...}';\n }\n }\n\n str += '</' + describeElementType(type) + '>';\n } else {\n // Print Array\n str = '[';\n var _array = objectOrArray;\n\n for (var _i = 0; _i < _array.length; _i++) {\n if (_i > 0) {\n str += ', ';\n }\n\n var _value = _array[_i];\n\n var _substr = void 0;\n\n if (typeof _value === 'object' && _value !== null) {\n _substr = describeObjectForErrorMessage(_value);\n } else {\n _substr = describeValueForErrorMessage(_value);\n }\n\n if ('' + _i === expandedName) {\n start = str.length;\n length = _substr.length;\n str += _substr;\n } else if (_substr.length < 10 && str.length + _substr.length < 40) {\n str += _substr;\n } else {\n str += '...';\n }\n }\n\n str += ']';\n }\n } else {\n if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) {\n str = '<' + describeElementType(objectOrArray.type) + '/>';\n } else if (jsxPropsParents.has(objectOrArray)) {\n // Print JSX\n var _type = jsxPropsParents.get(objectOrArray);\n\n str = '<' + (describeElementType(_type) || '...');\n var object = objectOrArray;\n var names = Object.keys(object);\n\n for (var _i2 = 0; _i2 < names.length; _i2++) {\n str += ' ';\n var name = names[_i2];\n str += describeKeyForErrorMessage(name) + '=';\n var _value2 = object[name];\n\n var _substr2 = void 0;\n\n if (name === expandedName && typeof _value2 === 'object' && _value2 !== null) {\n _substr2 = describeObjectForErrorMessage(_value2);\n } else {\n _substr2 = describeValueForErrorMessage(_value2);\n }\n\n if (typeof _value2 !== 'string') {\n _substr2 = '{' + _substr2 + '}';\n }\n\n if (name === expandedName) {\n start = str.length;\n length = _substr2.length;\n str += _substr2;\n } else if (_substr2.length < 10 && str.length + _substr2.length < 40) {\n str += _substr2;\n } else {\n str += '...';\n }\n }\n\n str += '>';\n } else {\n // Print Object\n str = '{';\n var _object = objectOrArray;\n\n var _names = Object.keys(_object);\n\n for (var _i3 = 0; _i3 < _names.length; _i3++) {\n if (_i3 > 0) {\n str += ', ';\n }\n\n var _name = _names[_i3];\n str += describeKeyForErrorMessage(_name) + ': ';\n var _value3 = _object[_name];\n\n var _substr3 = void 0;\n\n if (typeof _value3 === 'object' && _value3 !== null) {\n _substr3 = describeObjectForErrorMessage(_value3);\n } else {\n _substr3 = describeValueForErrorMessage(_value3);\n }\n\n if (_name === expandedName) {\n start = str.length;\n length = _substr3.length;\n str += _substr3;\n } else if (_substr3.length < 10 && str.length + _substr3.length < 40) {\n str += _substr3;\n } else {\n str += '...';\n }\n }\n\n str += '}';\n }\n }\n\n if (expandedName === undefined) {\n return str;\n }\n\n if (start > -1 && length > 0) {\n var highlight = ' '.repeat(start) + '^'.repeat(length);\n return '\\n ' + str + '\\n ' + highlight;\n }\n\n return '\\n ' + str;\n}\n\nvar knownServerReferences = new WeakMap(); // Serializable values\n// Thenable<ReactServerValue>\n// function serializeByValueID(id: number): string {\n// return '$' + id.toString(16);\n// }\n\nfunction serializePromiseID(id) {\n return '$@' + id.toString(16);\n}\n\nfunction serializeServerReferenceID(id) {\n return '$F' + id.toString(16);\n}\n\nfunction serializeSymbolReference(name) {\n return '$S' + name;\n}\n\nfunction serializeFormDataReference(id) {\n // Why K? F is \"Function\". D is \"Date\". What else?\n return '$K' + id.toString(16);\n}\n\nfunction serializeNumber(number) {\n if (Number.isFinite(number)) {\n if (number === 0 && 1 / number === -Infinity) {\n return '$-0';\n } else {\n return number;\n }\n } else {\n if (number === Infinity) {\n return '$Infinity';\n } else if (number === -Infinity) {\n return '$-Infinity';\n } else {\n return '$NaN';\n }\n }\n}\n\nfunction serializeUndefined() {\n return '$undefined';\n}\n\nfunction serializeDateFromDateJSON(dateJSON) {\n // JSON.stringify automatically calls Date.prototype.toJSON which calls toISOString.\n // We need only tack on a $D prefix.\n return '$D' + dateJSON;\n}\n\nfunction serializeBigInt(n) {\n return '$n' + n.toString(10);\n}\n\nfunction serializeMapID(id) {\n return '$Q' + id.toString(16);\n}\n\nfunction serializeSetID(id) {\n return '$W' + id.toString(16);\n}\n\nfunction escapeStringValue(value) {\n if (value[0] === '$') {\n // We need to escape $ prefixed strings since we use those to encode\n // references to IDs and as special symbol values.\n return '$' + value;\n } else {\n return value;\n }\n}\n\nfunction processReply(root, formFieldPrefix, resolve, reject) {\n var nextPartId = 1;\n var pendingParts = 0;\n var formData = null;\n\n function resolveToJSON(key, value) {\n var parent = this; // Make sure that `parent[key]` wasn't JSONified before `value` was passed to us\n\n {\n // $FlowFixMe[incompatible-use]\n var originalValue = parent[key];\n\n if (typeof originalValue === 'object' && originalValue !== value && !(originalValue instanceof Date)) {\n if (objectName(originalValue) !== 'Object') {\n error('Only plain objects can be passed to Server Functions from the Client. ' + '%s objects are not supported.%s', objectName(originalValue), describeObjectForErrorMessage(parent, key));\n } else {\n error('Only plain objects can be passed to Server Functions from the Client. ' + 'Objects with toJSON methods are not supported. Convert it manually ' + 'to a simple value before passing it to props.%s', describeObjectForErrorMessage(parent, key));\n }\n }\n }\n\n if (value === null) {\n return null;\n }\n\n if (typeof value === 'object') {\n // $FlowFixMe[method-unbinding]\n if (typeof value.then === 'function') {\n // We assume that any object with a .then property is a \"Thenable\" type,\n // or a Promise type. Either of which can be represented by a Promise.\n if (formData === null) {\n // Upgrade to use FormData to allow us to stream this value.\n formData = new FormData();\n }\n\n pendingParts++;\n var promiseId = nextPartId++;\n var thenable = value;\n thenable.then(function (partValue) {\n var partJSON = JSON.stringify(partValue, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.\n\n var data = formData; // eslint-disable-next-line react-internal/safe-string-coercion\n\n data.append(formFieldPrefix + promiseId, partJSON);\n pendingParts--;\n\n if (pendingParts === 0) {\n resolve(data);\n }\n }, function (reason) {\n // In the future we could consider serializing this as an error\n // that throws on the server instead.\n reject(reason);\n });\n return serializePromiseID(promiseId);\n } // TODO: Should we the Object.prototype.toString.call() to test for cross-realm objects?\n\n\n if (value instanceof FormData) {\n if (formData === null) {\n // Upgrade to use FormData to allow us to use rich objects as its values.\n formData = new FormData();\n }\n\n var data = formData;\n var refId = nextPartId++; // Copy all the form fields with a prefix for this reference.\n // These must come first in the form order because we assume that all the\n // fields are available before this is referenced.\n\n var prefix = formFieldPrefix + refId + '_'; // $FlowFixMe[prop-missing]: FormData has forEach.\n\n value.forEach(function (originalValue, originalKey) {\n data.append(prefix + originalKey, originalValue);\n });\n return serializeFormDataReference(refId);\n }\n\n if (value instanceof Map) {\n var partJSON = JSON.stringify(Array.from(value), resolveToJSON);\n\n if (formData === null) {\n formData = new FormData();\n }\n\n var mapId = nextPartId++;\n formData.append(formFieldPrefix + mapId, partJSON);\n return serializeMapID(mapId);\n }\n\n if (value instanceof Set) {\n var _partJSON = JSON.stringify(Array.from(value), resolveToJSON);\n\n if (formData === null) {\n formData = new FormData();\n }\n\n var setId = nextPartId++;\n formData.append(formFieldPrefix + setId, _partJSON);\n return serializeSetID(setId);\n }\n\n if (!isArray(value)) {\n var iteratorFn = getIteratorFn(value);\n\n if (iteratorFn) {\n return Array.from(value);\n }\n }\n\n {\n if (value !== null && !isArray(value)) {\n // Verify that this is a simple plain object.\n if (value.$$typeof === REACT_ELEMENT_TYPE) {\n error('React Element cannot be passed to Server Functions from the Client.%s', describeObjectForErrorMessage(parent, key));\n } else if (value.$$typeof === REACT_LAZY_TYPE) {\n error('React Lazy cannot be passed to Server Functions from the Client.%s', describeObjectForErrorMessage(parent, key));\n } else if (value.$$typeof === REACT_PROVIDER_TYPE) {\n error('React Context Providers cannot be passed to Server Functions from the Client.%s', describeObjectForErrorMessage(parent, key));\n } else if (objectName(value) !== 'Object') {\n error('Only plain objects can be passed to Client Components from Server Components. ' + '%s objects are not supported.%s', objectName(value), describeObjectForErrorMessage(parent, key));\n } else if (!isSimpleObject(value)) {\n error('Only plain objects can be passed to Client Components from Server Components. ' + 'Classes or other objects with methods are not supported.%s', describeObjectForErrorMessage(parent, key));\n } else if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(value);\n\n if (symbols.length > 0) {\n error('Only plain objects can be passed to Client Components from Server Components. ' + 'Objects with symbol properties like %s are not supported.%s', symbols[0].description, describeObjectForErrorMessage(parent, key));\n }\n }\n }\n } // $FlowFixMe[incompatible-return]\n\n\n return value;\n }\n\n if (typeof value === 'string') {\n // TODO: Maybe too clever. If we support URL there's no similar trick.\n if (value[value.length - 1] === 'Z') {\n // Possibly a Date, whose toJSON automatically calls toISOString\n // $FlowFixMe[incompatible-use]\n var _originalValue = parent[key];\n\n if (_originalValue instanceof Date) {\n return serializeDateFromDateJSON(value);\n }\n }\n\n return escapeStringValue(value);\n }\n\n if (typeof value === 'boolean') {\n return value;\n }\n\n if (typeof value === 'number') {\n return serializeNumber(value);\n }\n\n if (typeof value === 'undefined') {\n return serializeUndefined();\n }\n\n if (typeof value === 'function') {\n var metaData = knownServerReferences.get(value);\n\n if (metaData !== undefined) {\n var metaDataJSON = JSON.stringify(metaData, resolveToJSON);\n\n if (formData === null) {\n // Upgrade to use FormData to allow us to stream this value.\n formData = new FormData();\n } // The reference to this function came from the same client so we can pass it back.\n\n\n var _refId = nextPartId++; // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n formData.set(formFieldPrefix + _refId, metaDataJSON);\n return serializeServerReferenceID(_refId);\n }\n\n throw new Error('Client Functions cannot be passed directly to Server Functions. ' + 'Only Functions passed from the Server can be passed back again.');\n }\n\n if (typeof value === 'symbol') {\n // $FlowFixMe[incompatible-type] `description` might be undefined\n var name = value.description;\n\n if (Symbol.for(name) !== value) {\n throw new Error('Only global symbols received from Symbol.for(...) can be passed to Server Functions. ' + (\"The symbol Symbol.for(\" + // $FlowFixMe[incompatible-type] `description` might be undefined\n value.description + \") cannot be found among global symbols.\"));\n }\n\n return serializeSymbolReference(name);\n }\n\n if (typeof value === 'bigint') {\n return serializeBigInt(value);\n }\n\n throw new Error(\"Type \" + typeof value + \" is not supported as an argument to a Server Function.\");\n } // $FlowFixMe[incompatible-type] it's not going to be undefined because we'll encode it.\n\n\n var json = JSON.stringify(root, resolveToJSON);\n\n if (formData === null) {\n // If it's a simple data structure, we just use plain JSON.\n resolve(json);\n } else {\n // Otherwise, we use FormData to let us stream in the result.\n formData.set(formFieldPrefix + '0', json);\n\n if (pendingParts === 0) {\n // $FlowFixMe[incompatible-call] this has already been refined.\n resolve(formData);\n }\n }\n}\nfunction createServerReference(id, callServer) {\n var proxy = function () {\n // $FlowFixMe[method-unbinding]\n var args = Array.prototype.slice.call(arguments);\n return callServer(id, args);\n }; // Expose encoder for use by SSR.\n\n knownServerReferences.set(proxy, {\n id: id,\n bound: null\n });\n return proxy;\n}\n\nvar ContextRegistry = ReactSharedInternals.ContextRegistry;\nfunction getOrCreateServerContext(globalName) {\n if (!ContextRegistry[globalName]) {\n ContextRegistry[globalName] = React.createServerContext(globalName, // $FlowFixMe[incompatible-call] function signature doesn't reflect the symbol value\n REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED);\n }\n\n return ContextRegistry[globalName];\n}\n\nvar ROW_ID = 0;\nvar ROW_TAG = 1;\nvar ROW_LENGTH = 2;\nvar ROW_CHUNK_BY_NEWLINE = 3;\nvar ROW_CHUNK_BY_LENGTH = 4;\nvar PENDING = 'pending';\nvar BLOCKED = 'blocked';\nvar RESOLVED_MODEL = 'resolved_model';\nvar RESOLVED_MODULE = 'resolved_module';\nvar INITIALIZED = 'fulfilled';\nvar ERRORED = 'rejected'; // $FlowFixMe[missing-this-annot]\n\nfunction Chunk(status, value, reason, response) {\n this.status = status;\n this.value = value;\n this.reason = reason;\n this._response = response;\n} // We subclass Promise.prototype so that we get other methods like .catch\n\n\nChunk.prototype = Object.create(Promise.prototype); // TODO: This doesn't return a new Promise chain unlike the real .then\n\nChunk.prototype.then = function (resolve, reject) {\n var chunk = this; // If we have resolved content, we try to initialize it first which\n // might put us back into one of the other states.\n\n switch (chunk.status) {\n case RESOLVED_MODEL:\n initializeModelChunk(chunk);\n break;\n\n case RESOLVED_MODULE:\n initializeModuleChunk(chunk);\n break;\n } // The status might have changed after initialization.\n\n\n switch (chunk.status) {\n case INITIALIZED:\n resolve(chunk.value);\n break;\n\n case PENDING:\n case BLOCKED:\n if (resolve) {\n if (chunk.value === null) {\n chunk.value = [];\n }\n\n chunk.value.push(resolve);\n }\n\n if (reject) {\n if (chunk.reason === null) {\n chunk.reason = [];\n }\n\n chunk.reason.push(reject);\n }\n\n break;\n\n default:\n reject(chunk.reason);\n break;\n }\n};\n\nfunction readChunk(chunk) {\n // If we have resolved content, we try to initialize it first which\n // might put us back into one of the other states.\n switch (chunk.status) {\n case RESOLVED_MODEL:\n initializeModelChunk(chunk);\n break;\n\n case RESOLVED_MODULE:\n initializeModuleChunk(chunk);\n break;\n } // The status might have changed after initialization.\n\n\n switch (chunk.status) {\n case INITIALIZED:\n return chunk.value;\n\n case PENDING:\n case BLOCKED:\n // eslint-disable-next-line no-throw-literal\n throw chunk;\n\n default:\n throw chunk.reason;\n }\n}\n\nfunction getRoot(response) {\n var chunk = getChunk(response, 0);\n return chunk;\n}\n\nfunction createPendingChunk(response) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(PENDING, null, null, response);\n}\n\nfunction createBlockedChunk(response) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(BLOCKED, null, null, response);\n}\n\nfunction createErrorChunk(response, error) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(ERRORED, null, error, response);\n}\n\nfunction wakeChunk(listeners, value) {\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener(value);\n }\n}\n\nfunction wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {\n switch (chunk.status) {\n case INITIALIZED:\n wakeChunk(resolveListeners, chunk.value);\n break;\n\n case PENDING:\n case BLOCKED:\n chunk.value = resolveListeners;\n chunk.reason = rejectListeners;\n break;\n\n case ERRORED:\n if (rejectListeners) {\n wakeChunk(rejectListeners, chunk.reason);\n }\n\n break;\n }\n}\n\nfunction triggerErrorOnChunk(chunk, error) {\n if (chunk.status !== PENDING && chunk.status !== BLOCKED) {\n // We already resolved. We didn't expect to see this.\n return;\n }\n\n var listeners = chunk.reason;\n var erroredChunk = chunk;\n erroredChunk.status = ERRORED;\n erroredChunk.reason = error;\n\n if (listeners !== null) {\n wakeChunk(listeners, error);\n }\n}\n\nfunction createResolvedModelChunk(response, value) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(RESOLVED_MODEL, value, null, response);\n}\n\nfunction createResolvedModuleChunk(response, value) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(RESOLVED_MODULE, value, null, response);\n}\n\nfunction createInitializedTextChunk(response, value) {\n // $FlowFixMe[invalid-constructor] Flow doesn't support functions as constructors\n return new Chunk(INITIALIZED, value, null, response);\n}\n\nfunction resolveModelChunk(chunk, value) {\n if (chunk.status !== PENDING) {\n // We already resolved. We didn't expect to see this.\n return;\n }\n\n var resolveListeners = chunk.value;\n var rejectListeners = chunk.reason;\n var resolvedChunk = chunk;\n resolvedChunk.status = RESOLVED_MODEL;\n resolvedChunk.value = value;\n\n if (resolveListeners !== null) {\n // This is unfortunate that we're reading this eagerly if\n // we already have listeners attached since they might no\n // longer be rendered or might not be the highest pri.\n initializeModelChunk(resolvedChunk); // The status might have changed after initialization.\n\n wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);\n }\n}\n\nfunction resolveModuleChunk(chunk, value) {\n if (chunk.status !== PENDING && chunk.status !== BLOCKED) {\n // We already resolved. We didn't expect to see this.\n return;\n }\n\n var resolveListeners = chunk.value;\n var rejectListeners = chunk.reason;\n var resolvedChunk = chunk;\n resolvedChunk.status = RESOLVED_MODULE;\n resolvedChunk.value = value;\n\n if (resolveListeners !== null) {\n initializeModuleChunk(resolvedChunk);\n wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);\n }\n}\n\nvar initializingChunk = null;\nvar initializingChunkBlockedModel = null;\n\nfunction initializeModelChunk(chunk) {\n var prevChunk = initializingChunk;\n var prevBlocked = initializingChunkBlockedModel;\n initializingChunk = chunk;\n initializingChunkBlockedModel = null;\n\n try {\n var value = parseModel(chunk._response, chunk.value);\n\n if (initializingChunkBlockedModel !== null && initializingChunkBlockedModel.deps > 0) {\n initializingChunkBlockedModel.value = value; // We discovered new dependencies on modules that are not yet resolved.\n // We have to go the BLOCKED state until they're resolved.\n\n var blockedChunk = chunk;\n blockedChunk.status = BLOCKED;\n blockedChunk.value = null;\n blockedChunk.reason = null;\n } else {\n var initializedChunk = chunk;\n initializedChunk.status = INITIALIZED;\n initializedChunk.value = value;\n }\n } catch (error) {\n var erroredChunk = chunk;\n erroredChunk.status = ERRORED;\n erroredChunk.reason = error;\n } finally {\n initializingChunk = prevChunk;\n initializingChunkBlockedModel = prevBlocked;\n }\n}\n\nfunction initializeModuleChunk(chunk) {\n try {\n var value = requireModule(chunk.value);\n var initializedChunk = chunk;\n initializedChunk.status = INITIALIZED;\n initializedChunk.value = value;\n } catch (error) {\n var erroredChunk = chunk;\n erroredChunk.status = ERRORED;\n erroredChunk.reason = error;\n }\n} // Report that any missing chunks in the model is now going to throw this\n// error upon read. Also notify any pending promises.\n\n\nfunction reportGlobalError(response, error) {\n response._chunks.forEach(function (chunk) {\n // If this chunk was already resolved or errored, it won't\n // trigger an error but if it wasn't then we need to\n // because we won't be getting any new data to resolve it.\n if (chunk.status === PENDING) {\n triggerErrorOnChunk(chunk, error);\n }\n });\n}\n\nfunction createElement(type, key, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: null,\n props: props,\n // Record the component responsible for creating this element.\n _owner: null\n };\n\n {\n // We don't really need to add any of these but keeping them for good measure.\n // Unfortunately, _store is enumerable in jest matchers so for equality to\n // work, I need to keep it or make _store non-enumerable in the other file.\n element._store = {};\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: true // This element has already been validated on the server.\n\n });\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: null\n });\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: null\n });\n }\n\n return element;\n}\n\nfunction createLazyChunkWrapper(chunk) {\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: chunk,\n _init: readChunk\n };\n return lazyType;\n}\n\nfunction getChunk(response, id) {\n var chunks = response._chunks;\n var chunk = chunks.get(id);\n\n if (!chunk) {\n chunk = createPendingChunk(response);\n chunks.set(id, chunk);\n }\n\n return chunk;\n}\n\nfunction createModelResolver(chunk, parentObject, key) {\n var blocked;\n\n if (initializingChunkBlockedModel) {\n blocked = initializingChunkBlockedModel;\n blocked.deps++;\n } else {\n blocked = initializingChunkBlockedModel = {\n deps: 1,\n value: null\n };\n }\n\n return function (value) {\n parentObject[key] = value;\n blocked.deps--;\n\n if (blocked.deps === 0) {\n if (chunk.status !== BLOCKED) {\n return;\n }\n\n var resolveListeners = chunk.value;\n var initializedChunk = chunk;\n initializedChunk.status = INITIALIZED;\n initializedChunk.value = blocked.value;\n\n if (resolveListeners !== null) {\n wakeChunk(resolveListeners, blocked.value);\n }\n }\n };\n}\n\nfunction createModelReject(chunk) {\n return function (error) {\n return triggerErrorOnChunk(chunk, error);\n };\n}\n\nfunction createServerReferenceProxy(response, metaData) {\n var callServer = response._callServer;\n\n var proxy = function () {\n // $FlowFixMe[method-unbinding]\n var args = Array.prototype.slice.call(arguments);\n var p = metaData.bound;\n\n if (!p) {\n return callServer(metaData.id, args);\n }\n\n if (p.status === INITIALIZED) {\n var bound = p.value;\n return callServer(metaData.id, bound.concat(args));\n } // Since this is a fake Promise whose .then doesn't chain, we have to wrap it.\n // TODO: Remove the wrapper once that's fixed.\n\n\n return Promise.resolve(p).then(function (bound) {\n return callServer(metaData.id, bound.concat(args));\n });\n }; // Expose encoder for use by SSR.\n\n knownServerReferences.set(proxy, metaData);\n return proxy;\n}\n\nfunction getOutlinedModel(response, id) {\n var chunk = getChunk(response, id);\n\n switch (chunk.status) {\n case RESOLVED_MODEL:\n initializeModelChunk(chunk);\n break;\n } // The status might have changed after initialization.\n\n\n switch (chunk.status) {\n case INITIALIZED:\n {\n return chunk.value;\n }\n // We always encode it first in the stream so it won't be pending.\n\n default:\n throw chunk.reason;\n }\n}\n\nfunction parseModelString(response, parentObject, key, value) {\n if (value[0] === '$') {\n if (value === '$') {\n // A very common symbol.\n return REACT_ELEMENT_TYPE;\n }\n\n switch (value[1]) {\n case '$':\n {\n // This was an escaped string value.\n return value.slice(1);\n }\n\n case 'L':\n {\n // Lazy node\n var id = parseInt(value.slice(2), 16);\n var chunk = getChunk(response, id); // We create a React.lazy wrapper around any lazy values.\n // When passed into React, we'll know how to suspend on this.\n\n return createLazyChunkWrapper(chunk);\n }\n\n case '@':\n {\n // Promise\n var _id = parseInt(value.slice(2), 16);\n\n var _chunk = getChunk(response, _id);\n\n return _chunk;\n }\n\n case 'S':\n {\n // Symbol\n return Symbol.for(value.slice(2));\n }\n\n case 'P':\n {\n // Server Context Provider\n return getOrCreateServerContext(value.slice(2)).Provider;\n }\n\n case 'F':\n {\n // Server Reference\n var _id2 = parseInt(value.slice(2), 16);\n\n var metadata = getOutlinedModel(response, _id2);\n return createServerReferenceProxy(response, metadata);\n }\n\n case 'Q':\n {\n // Map\n var _id3 = parseInt(value.slice(2), 16);\n\n var data = getOutlinedModel(response, _id3);\n return new Map(data);\n }\n\n case 'W':\n {\n // Set\n var _id4 = parseInt(value.slice(2), 16);\n\n var _data = getOutlinedModel(response, _id4);\n\n return new Set(_data);\n }\n\n case 'I':\n {\n // $Infinity\n return Infinity;\n }\n\n case '-':\n {\n // $-0 or $-Infinity\n if (value === '$-0') {\n return -0;\n } else {\n return -Infinity;\n }\n }\n\n case 'N':\n {\n // $NaN\n return NaN;\n }\n\n case 'u':\n {\n // matches \"$undefined\"\n // Special encoding for `undefined` which can't be serialized as JSON otherwise.\n return undefined;\n }\n\n case 'D':\n {\n // Date\n return new Date(Date.parse(value.slice(2)));\n }\n\n case 'n':\n {\n // BigInt\n return BigInt(value.slice(2));\n }\n\n default:\n {\n // We assume that anything else is a reference ID.\n var _id5 = parseInt(value.slice(1), 16);\n\n var _chunk2 = getChunk(response, _id5);\n\n switch (_chunk2.status) {\n case RESOLVED_MODEL:\n initializeModelChunk(_chunk2);\n break;\n\n case RESOLVED_MODULE:\n initializeModuleChunk(_chunk2);\n break;\n } // The status might have changed after initialization.\n\n\n switch (_chunk2.status) {\n case INITIALIZED:\n return _chunk2.value;\n\n case PENDING:\n case BLOCKED:\n var parentChunk = initializingChunk;\n\n _chunk2.then(createModelResolver(parentChunk, parentObject, key), createModelReject(parentChunk));\n\n return null;\n\n default:\n throw _chunk2.reason;\n }\n }\n }\n }\n\n return value;\n}\n\nfunction parseModelTuple(response, value) {\n var tuple = value;\n\n if (tuple[0] === REACT_ELEMENT_TYPE) {\n // TODO: Consider having React just directly accept these arrays as elements.\n // Or even change the ReactElement type to be an array.\n return createElement(tuple[1], tuple[2], tuple[3]);\n }\n\n return value;\n}\n\nfunction missingCall() {\n throw new Error('Trying to call a function from \"use server\" but the callServer option ' + 'was not implemented in your router runtime.');\n}\n\nfunction createResponse(bundlerConfig, callServer) {\n var chunks = new Map();\n var response = {\n _bundlerConfig: bundlerConfig,\n _callServer: callServer !== undefined ? callServer : missingCall,\n _chunks: chunks,\n _stringDecoder: createStringDecoder(),\n _fromJSON: null,\n _rowState: 0,\n _rowID: 0,\n _rowTag: 0,\n _rowLength: 0,\n _buffer: []\n }; // Don't inline this call because it causes closure to outline the call above.\n\n response._fromJSON = createFromJSONCallback(response);\n return response;\n}\n\nfunction resolveModel(response, id, model) {\n var chunks = response._chunks;\n var chunk = chunks.get(id);\n\n if (!chunk) {\n chunks.set(id, createResolvedModelChunk(response, model));\n } else {\n resolveModelChunk(chunk, model);\n }\n}\n\nfunction resolveText(response, id, text) {\n var chunks = response._chunks; // We assume that we always reference large strings after they've been\n // emitted.\n\n chunks.set(id, createInitializedTextChunk(response, text));\n}\n\nfunction resolveModule(response, id, model) {\n var chunks = response._chunks;\n var chunk = chunks.get(id);\n var clientReferenceMetadata = parseModel(response, model);\n var clientReference = resolveClientReference(response._bundlerConfig, clientReferenceMetadata); // TODO: Add an option to encode modules that are lazy loaded.\n // For now we preload all modules as early as possible since it's likely\n // that we'll need them.\n\n var promise = preloadModule(clientReference);\n\n if (promise) {\n var blockedChunk;\n\n if (!chunk) {\n // Technically, we should just treat promise as the chunk in this\n // case. Because it'll just behave as any other promise.\n blockedChunk = createBlockedChunk(response);\n chunks.set(id, blockedChunk);\n } else {\n // This can't actually happen because we don't have any forward\n // references to modules.\n blockedChunk = chunk;\n blockedChunk.status = BLOCKED;\n }\n\n promise.then(function () {\n return resolveModuleChunk(blockedChunk, clientReference);\n }, function (error) {\n return triggerErrorOnChunk(blockedChunk, error);\n });\n } else {\n if (!chunk) {\n chunks.set(id, createResolvedModuleChunk(response, clientReference));\n } else {\n // This can't actually happen because we don't have any forward\n // references to modules.\n resolveModuleChunk(chunk, clientReference);\n }\n }\n}\n\nfunction resolveErrorDev(response, id, digest, message, stack) {\n\n\n var error = new Error(message || 'An error occurred in the Server Components render but no message was provided');\n error.stack = stack;\n error.digest = digest;\n var errorWithDigest = error;\n var chunks = response._chunks;\n var chunk = chunks.get(id);\n\n if (!chunk) {\n chunks.set(id, createErrorChunk(response, errorWithDigest));\n } else {\n triggerErrorOnChunk(chunk, errorWithDigest);\n }\n}\n\nfunction resolveHint(response, code, model) {\n var hintModel = parseModel(response, model);\n dispatchHint(code, hintModel);\n}\n\nfunction processFullRow(response, id, tag, buffer, chunk) {\n\n var stringDecoder = response._stringDecoder;\n var row = '';\n\n for (var i = 0; i < buffer.length; i++) {\n row += readPartialStringChunk(stringDecoder, buffer[i]);\n }\n\n row += readFinalStringChunk(stringDecoder, chunk);\n\n switch (tag) {\n case 73\n /* \"I\" */\n :\n {\n resolveModule(response, id, row);\n return;\n }\n\n case 72\n /* \"H\" */\n :\n {\n var code = row[0];\n resolveHint(response, code, row.slice(1));\n return;\n }\n\n case 69\n /* \"E\" */\n :\n {\n var errorInfo = JSON.parse(row);\n\n {\n resolveErrorDev(response, id, errorInfo.digest, errorInfo.message, errorInfo.stack);\n }\n\n return;\n }\n\n case 84\n /* \"T\" */\n :\n {\n resolveText(response, id, row);\n return;\n }\n\n default:\n /* \"\"\" \"{\" \"[\" \"t\" \"f\" \"n\" \"0\" - \"9\" */\n {\n // We assume anything else is JSON.\n resolveModel(response, id, row);\n return;\n }\n }\n}\n\nfunction processBinaryChunk(response, chunk) {\n var i = 0;\n var rowState = response._rowState;\n var rowID = response._rowID;\n var rowTag = response._rowTag;\n var rowLength = response._rowLength;\n var buffer = response._buffer;\n var chunkLength = chunk.length;\n\n while (i < chunkLength) {\n var lastIdx = -1;\n\n switch (rowState) {\n case ROW_ID:\n {\n var byte = chunk[i++];\n\n if (byte === 58\n /* \":\" */\n ) {\n // Finished the rowID, next we'll parse the tag.\n rowState = ROW_TAG;\n } else {\n rowID = rowID << 4 | (byte > 96 ? byte - 87 : byte - 48);\n }\n\n continue;\n }\n\n case ROW_TAG:\n {\n var resolvedRowTag = chunk[i];\n\n if (resolvedRowTag === 84\n /* \"T\" */\n || enableBinaryFlight \n /* \"V\" */\n ) {\n rowTag = resolvedRowTag;\n rowState = ROW_LENGTH;\n i++;\n } else if (resolvedRowTag > 64 && resolvedRowTag < 91\n /* \"A\"-\"Z\" */\n ) {\n rowTag = resolvedRowTag;\n rowState = ROW_CHUNK_BY_NEWLINE;\n i++;\n } else {\n rowTag = 0;\n rowState = ROW_CHUNK_BY_NEWLINE; // This was an unknown tag so it was probably part of the data.\n }\n\n continue;\n }\n\n case ROW_LENGTH:\n {\n var _byte = chunk[i++];\n\n if (_byte === 44\n /* \",\" */\n ) {\n // Finished the rowLength, next we'll buffer up to that length.\n rowState = ROW_CHUNK_BY_LENGTH;\n } else {\n rowLength = rowLength << 4 | (_byte > 96 ? _byte - 87 : _byte - 48);\n }\n\n continue;\n }\n\n case ROW_CHUNK_BY_NEWLINE:\n {\n // We're looking for a newline\n lastIdx = chunk.indexOf(10\n /* \"\\n\" */\n , i);\n break;\n }\n\n case ROW_CHUNK_BY_LENGTH:\n {\n // We're looking for the remaining byte length\n lastIdx = i + rowLength;\n\n if (lastIdx > chunk.length) {\n lastIdx = -1;\n }\n\n break;\n }\n }\n\n var offset = chunk.byteOffset + i;\n\n if (lastIdx > -1) {\n // We found the last chunk of the row\n var length = lastIdx - i;\n var lastChunk = new Uint8Array(chunk.buffer, offset, length);\n processFullRow(response, rowID, rowTag, buffer, lastChunk); // Reset state machine for a new row\n\n i = lastIdx;\n\n if (rowState === ROW_CHUNK_BY_NEWLINE) {\n // If we're trailing by a newline we need to skip it.\n i++;\n }\n\n rowState = ROW_ID;\n rowTag = 0;\n rowID = 0;\n rowLength = 0;\n buffer.length = 0;\n } else {\n // The rest of this row is in a future chunk. We stash the rest of the\n // current chunk until we can process the full row.\n var _length = chunk.byteLength - i;\n\n var remainingSlice = new Uint8Array(chunk.buffer, offset, _length);\n buffer.push(remainingSlice); // Update how many bytes we're still waiting for. If we're looking for\n // a newline, this doesn't hurt since we'll just ignore it.\n\n rowLength -= remainingSlice.byteLength;\n break;\n }\n }\n\n response._rowState = rowState;\n response._rowID = rowID;\n response._rowTag = rowTag;\n response._rowLength = rowLength;\n}\n\nfunction parseModel(response, json) {\n return JSON.parse(json, response._fromJSON);\n}\n\nfunction createFromJSONCallback(response) {\n // $FlowFixMe[missing-this-annot]\n return function (key, value) {\n if (typeof value === 'string') {\n // We can't use .bind here because we need the \"this\" value.\n return parseModelString(response, this, key, value);\n }\n\n if (typeof value === 'object' && value !== null) {\n return parseModelTuple(response, value);\n }\n\n return value;\n };\n}\n\nfunction close(response) {\n // In case there are any remaining unresolved chunks, they won't\n // be resolved now. So we need to issue an error to those.\n // Ideally we should be able to early bail out if we kept a\n // ref count of pending chunks.\n reportGlobalError(response, new Error('Connection closed.'));\n}\n\nfunction createResponseFromOptions(options) {\n return createResponse(null, options && options.callServer ? options.callServer : undefined);\n}\n\nfunction startReadingFromStream(response, stream) {\n var reader = stream.getReader();\n\n function progress(_ref) {\n var done = _ref.done,\n value = _ref.value;\n\n if (done) {\n close(response);\n return;\n }\n\n var buffer = value;\n processBinaryChunk(response, buffer);\n return reader.read().then(progress).catch(error);\n }\n\n function error(e) {\n reportGlobalError(response, e);\n }\n\n reader.read().then(progress).catch(error);\n}\n\nfunction createFromReadableStream(stream, options) {\n var response = createResponseFromOptions(options);\n startReadingFromStream(response, stream);\n return getRoot(response);\n}\n\nfunction createFromFetch(promiseForResponse, options) {\n var response = createResponseFromOptions(options);\n promiseForResponse.then(function (r) {\n startReadingFromStream(response, r.body);\n }, function (e) {\n reportGlobalError(response, e);\n });\n return getRoot(response);\n}\n\nfunction encodeReply(value)\n/* We don't use URLSearchParams yet but maybe */\n{\n return new Promise(function (resolve, reject) {\n processReply(value, '', resolve, reject);\n });\n}\n\nexports.createFromFetch = createFromFetch;\nexports.createFromReadableStream = createFromReadableStream;\nexports.createServerReference = createServerReference;\nexports.encodeReply = encodeReply;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1zZXJ2ZXItZG9tLXdlYnBhY2svY2pzL3JlYWN0LXNlcnZlci1kb20td2VicGFjay1jbGllbnQuYnJvd3Nlci5kZXZlbG9wbWVudC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRWE7O0FBRWIsSUFBSSxJQUFxQztBQUN6QztBQUNBOztBQUVBLGVBQWUsbUJBQU8sQ0FBQyxvRkFBVztBQUNsQyxZQUFZLG1CQUFPLENBQUMsNEVBQU87O0FBRTNCO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFNO0FBQ047QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QU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IElmIHdlIGhhdmUgcmVzb2x2ZWQgY29udGVudCwgd2UgdHJ5IHRvIGluaXRpYWxpemUgaXQgZmlyc3Qgd2hpY2hcbiAgLy8gbWlnaHQgcHV0IHVzIGJhY2sgaW50byBvbmUgb2YgdGhlIG90aGVyIHN0YXRlcy5cblxuICBzd2l0Y2ggKGNodW5rLnN0YXR1cykge1xuICAgIGNhc2UgUkVTT0xWRURfTU9ERUw6XG4gICAgICBpbml0aWFsaXplTW9kZWxDaHVuayhjaHVuayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgUkVTT0xWRURfTU9EVUxFOlxuICAgICAgaW5pdGlhbGl6ZU1vZHVsZUNodW5rKGNodW5rKTtcbiAgICAgIGJyZWFrO1xuICB9IC8vIFRoZSBzdGF0dXMgbWlnaHQgaGF2ZSBjaGFuZ2VkIGFmdGVyIGluaXRpYWxpemF0aW9uLlxuXG5cbiAgc3dpdGNoIChjaHVuay5zdGF0dXMpIHtcbiAgICBjYXNlIElOSVRJQUxJWkVEOlxuICAgICAgcmVzb2x2ZShjaHVuay52YWx1ZSk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgUEVORElORzpcbiAgICBjYXNlIEJMT0NLRUQ6XG4gICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICBpZiAoY2h1bmsudmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICBjaHVuay52YWx1ZSA9IFtdO1xuICAgICAgICB9XG5cbiAgICAgICAgY2h1bmsudmFsdWUucHVzaChyZXNvbHZlKTtcbiAgICAgIH1cblxuICAgICAgaWYgKHJlamVjdCkge1xuICAgICAgICBpZiAoY2h1bmsucmVhc29uID09PSBudWxsKSB7XG4gICAgICAgICAgY2h1bmsucmVhc29uID0gW107XG4gICAgICAgIH1cblxuICAgICAgICBjaHVuay5yZWFzb24ucHVzaChyZWplY3QpO1xuICAgICAgfVxuXG4gICAgICBicmVhaztcblxuICAgIGRlZmF1bHQ6XG4gICAgICByZWplY3QoY2h1bmsucmV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zpcbiAgICAgICAge1xuICAgICAgICAgIC8vIE1hcFxuICAgICAgICAgIHZhciBfaWQzID0gcGFyc2VJbnQodmFsdWUuc2xpY2UoMiksIDE2KTtcblxuICAgICAgICAgIHZhciBkYXRhID0gZ2V0T3V0bGluZWRNb2RlbChyZXNwb25zZSwgX2lkMyk7XG4gICAgICAgICAgcmV0dXJuIG5ldyBNYXAoZGF0YSk7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSAnVyc6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBTZXRcbiAgICAgICAgICB2YXIgX2lkNCA9IHBhcnNlSW50KHZhbHVlLnNsaWNlKDIpLCAxNik7XG5cbiAgICAgICAgICB2YXIgX2RhdGEgPSBnZXRPdXRsaW5lZE1vZGVsKHJlc3BvbnNlLCBfaWQ0KTtcblxuICAgICAgICAgIHJldHVybiBuZXcgU2V0KF9kYXRhKTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlICdJJzpcbiAgICAgICAge1xuICAgICAgICAgIC8vICRJbmZpbml0eVxuICAgICAgICAgIHJldHVybiBJbmZpbml0eTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlICctJzpcbiAgICAgICAge1xuICAgICAgICAgIC8vICQtMCBvciAkLUluZmluaXR5XG4gICAgICAgICAgaWYgKHZhbHVlID09PSAnJC0wJykge1xuICAgICAgICAgICAgcmV0dXJuIC0wO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gLUluZmluaXR5O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICBjYXNlICdOJzpcbiAgICAgICAge1xuICAgICAgICAgIC8vICROYU5cbiAgICAgICAgICByZXR1cm4gTmFOO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3UnOlxuICAgICAgICB7XG4gICAgICAgICAgLy8gbWF0Y2hlcyBcIiR1bmRlZmluZWRcIlxuICAgICAgICAgIC8vIFNwZWNpYWwgZW5jb2RpbmcgZm9yIGB1bmRlZmluZWRgIHdoaWNoIGNhbid0IGJlIHNlcmlhbGl6ZWQgYXMgSlNPTiBvdGhlcndpc2UuXG4gICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlICdEJzpcbiAgICAgICAge1xuICAgICAgICAgIC8vIERhdGVcbiAgICAgICAgICByZXR1cm4gbmV3IERhdGUoRGF0ZS5wYXJzZSh2YWx1ZS5zbGljZSgyKSkpO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ24nOlxuICAgICAgICB7XG4gICAgICAgICAgLy8gQmlnSW50XG4gICAgICAgICAgcmV0dXJuIEJpZ0ludCh2YWx1ZS5zbGljZSgyKSk7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIFdlIGFzc3VtZSB0aGF0IGFueXRoaW5nIGVsc2UgaXMgYSByZWZlcmVuY2UgSUQuXG4gICAgICAgICAgdmFyIF9pZDUgPSBwYXJzZUludCh2YWx1ZS5zbGljZSgxKSwgMTYpO1xuXG4gICAgICAgICAgdmFyIF9jaHVuazIgPSBnZXRDaHVuayhyZXNwb25zZSwgX2lkNSk7XG5cbiAgICAgICAgICBzd2l0Y2ggKF9jaHVuazIuc3RhdHVzKSB7XG4gICAgICAgICAgICBjYXNlIFJFU09MVkVEX01PREVMOlxuICAgICAgICAgICAgICBpbml0aWFsaXplTW9kZWxDaHVuayhfY2h1bmsyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgUkVTT0xWRURfTU9EVUxFOlxuICAgICAgICAgICAgICBpbml0aWFsaXplTW9kdWxlQ2h1bmsoX2NodW5rMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH0gLy8gVGhlIHN0YXR1cyBtaWdodCBoYXZlIGNoYW5nZWQgYWZ0ZXIgaW5pdGlhbGl6YXRpb24uXG5cblxuICAgICAgICAgIHN3aXRjaCAo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NThcbiAgICAgICAgICAvKiBcIjpcIiAqL1xuICAgICAgICAgICkge1xuICAgICAgICAgICAgICAvLyBGaW5pc2hlZCB0aGUgcm93SUQsIG5leHQgd2UnbGwgcGFyc2UgdGhlIHRhZy5cbiAgICAgICAgICAgICAgcm93U3RhdGUgPSBST1dfVEFHO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJvd0lEID0gcm93SUQgPDwgNCB8IChieXRlID4gOTYgPyBieXRlIC0gODcgOiBieXRlIC0gNDgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUk9XX1RBRzpcbiAgICAgICAge1xuICAgICAgICAgIHZhciByZXNvbHZlZFJvd1RhZyA9IGNodW5rW2ldO1xuXG4gICAgICAgICAgaWYgKHJlc29sdmVkUm93VGFnID09PSA4NFxuICAgICAgICAgIC8qIFwiVFwiICovXG4gICAgICAgICAgfHwgZW5hYmxlQmluYXJ5RmxpZ2h0IFxuICAgICAgICAgIC8qIFwiVlwiICovXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHJvd1RhZyA9IHJlc29sdmVkUm93VGFnO1xuICAgICAgICAgICAgICByb3dTdGF0ZSA9IFJPV19MRU5HVEg7XG4gICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzb2x2ZWRSb3dUYWcgPiA2NCAmJiByZXNvbHZlZFJvd1RhZyA8IDkxXG4gICAgICAgICAgLyogXCJBXCItXCJaXCIgKi9cbiAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgcm93VGFnID0gcmVzb2x2ZWRSb3dUYWc7XG4gICAgICAgICAgICAgIHJvd1N0YXRlID0gUk9XX0NIVU5LX0JZX05FV0xJTkU7XG4gICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByb3dUYWcgPSAwO1xuICAgICAgICAgICAgcm93U3RhdGUgPSBST1dfQ0hVTktfQllfTkVXTElORTsgLy8gVGhpcyB3YXMgYW4gdW5rbm93biB0YWcgc28gaXQgd2FzIHByb2JhYmx5IHBhcnQgb2YgdGhlIGRhdGEuXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBST1dfTEVOR1RIOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIF9ieXRlID0gY2h1bmtbaSsrXTtcblxuICAgICAgICAgIGlmIChfYnl0ZSA9PT0gNDRcbiAgICAgICAgICAvKiBcIixcIiAqL1xuICAgICAgICAgICkge1xuICAgICAgICAgICAgICAvLyBGaW5pc2hlZCB0aGUgcm93TGVuZ3RoLCBuZXh0IHdlJ2xsIGJ1ZmZlciB1cCB0byB0aGF0IGxlbmd0aC5cbiAgICAgICAgICAgICAgcm93U3RhdGUgPSBST1dfQ0hVTktfQllfTEVOR1RIO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJvd0xlbmd0aCA9IHJvd0xlbmd0aCA8PCA0IHwgKF9ieXRlID4gOTYgPyBfYnl0ZSAtIDg3IDogX2J5dGUgLSA0OCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBST1dfQ0hVTktfQllfTkVXTElORTpcbiAgICAgICAge1xuICAgICAgICAgIC8vIFdlJ3JlIGxvb2tpbmcgZm9yIGEgbmV3bGluZVxuICAgICAgICAgIGxhc3RJZHggPSBjaHVuay5pbmRleE9mKDEwXG4gICAgICAgICAgLyogXCJcXG5cIiAqL1xuICAgICAgICAgICwgaSk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBST1dfQ0hVTktfQllfTEVOR1RIOlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UncmUgbG9va2luZyBmb3IgdGhlIHJlbWFpbmluZyBieXRlIGxlbmd0aFxuIC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ci5ib2R5KTtcbiAgfSwgZnVuY3Rpb24gKGUpIHtcbiAgICByZXBvcnRHbG9iYWxFcnJvcihyZXNwb25zZSwgZSk7XG4gIH0pO1xuICByZXR1cm4gZ2V0Um9vdChyZXNwb25zZSk7XG59XG5cbmZ1bmN0aW9uIGVuY29kZVJlcGx5KHZhbHVlKVxuLyogV2UgZG9uJ3QgdXNlIFVSTFNlYXJjaFBhcmFtcyB5ZXQgYnV0IG1heWJlICovXG57XG4gIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgcHJvY2Vzc1JlcGx5KHZhbHVlLCAnJywgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgfSk7XG59XG5cbmV4cG9ydHMuY3JlYXRlRnJvbUZldGNoID0gY3JlYXRlRnJvbUZldGNoO1xuZXhwb3J0cy5jcmVhdGVGcm9tUmVhZGFibGVTdHJlYW0gPSBjcmVhdGVGcm9tUmVhZGFibGVTdHJlYW07XG5leHBvcnRzLmNyZWF0ZVNlcnZlclJlZmVyZW5jZSA9IGNyZWF0ZVNlcnZlclJlZmVyZW5jZTtcbmV4cG9ydHMuZW5jb2RlUmVwbHkgPSBlbmNvZGVSZXBseTtcbiAgfSkoKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.browser.js": /*!************************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-server-dom-webpack/client.browser.js ***! \************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-server-dom-webpack-client.browser.development.js */ \"(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1zZXJ2ZXItZG9tLXdlYnBhY2svY2xpZW50LmJyb3dzZXIuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsSUFBSSxLQUFxQyxFQUFFLEVBRTFDLENBQUM7QUFDRixFQUFFLDhPQUF3RjtBQUMxRiIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LXNlcnZlci1kb20td2VicGFjay9jbGllbnQuYnJvd3Nlci5qcz83OWFmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1zZXJ2ZXItZG9tLXdlYnBhY2stY2xpZW50LmJyb3dzZXIucHJvZHVjdGlvbi5taW4uanMnKTtcbn0gZWxzZSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvcmVhY3Qtc2VydmVyLWRvbS13ZWJwYWNrLWNsaWVudC5icm93c2VyLmRldmVsb3BtZW50LmpzJyk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.browser.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.js": /*!****************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react-server-dom-webpack/client.js ***! \****************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nmodule.exports = __webpack_require__(/*! ./client.browser */ \"(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.browser.js\");\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1zZXJ2ZXItZG9tLXdlYnBhY2svY2xpZW50LmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLHlKQUE0QyIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LXNlcnZlci1kb20td2VicGFjay9jbGllbnQuanM/ZTIxNyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9jbGllbnQuYnJvd3NlcicpO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-server-dom-webpack/client.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react/cjs/react.development.js": /*!************************************************************************!*\ !*** ./node_modules/next/dist/compiled/react/cjs/react.development.js ***! \************************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/* module decorator */ module = __webpack_require__.nmd(module);\n/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.0-canary-7118f5dd7-20230705';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher$1 = {\n current: null\n};\n\n/**\n * Keeps track of the current Cache dispatcher.\n */\nvar ReactCurrentCache = {\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false,\n // Tracks whether something called `use` during the current batch of work.\n // Determines whether we should yield to microtasks to unwrap already resolved\n // promises without suspending.\n didUsePromise: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame$1 = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n\n ReactDebugCurrentFrame$1.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame$1.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ContextRegistry$1 = {};\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher$1,\n ReactCurrentCache: ReactCurrentCache,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n{\n ReactSharedInternals.ContextRegistry = ContextRegistry$1;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n case REACT_SERVER_CONTEXT_TYPE:\n {\n var context2 = type;\n return (context2.displayName || context2._globalName) + '.Provider';\n }\n\n }\n }\n\n return null;\n}\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nfunction ReactElement(type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n}\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement$1(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement$1(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey( // $FlowFixMe[unsafe-addition]\n '' + mappedChild.key // eslint-disable-line react-internal/safe-string-coercion\n ) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0; // $FlowFixMe[incompatible-use] `iteratorFn` might return null according to typing.\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, // $FlowFixMe[missing-this-annot]\n function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe[prop-missing]: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe[prop-missing]: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe[prop-missing]\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n // $FlowFixMe[missing-local-annot]\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe[prop-missing]\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n // $FlowFixMe[missing-local-annot]\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe[prop-missing]\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nvar ERRORED = 2;\n\nfunction createCacheRoot() {\n return new WeakMap();\n}\n\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n // status, represents whether the cached computation returned a value or threw an error\n v: undefined,\n // value, either the cached result or an error, depending on s\n o: null,\n // object cache, a WeakMap where non-primitive arguments are stored\n p: null // primitive cache, a regular Map where primitive arguments are stored.\n\n };\n}\n\nfunction cache(fn) {\n return function () {\n var dispatcher = ReactCurrentCache.current;\n\n if (!dispatcher) {\n // If there is no dispatcher, then we treat this as not being cached.\n // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.\n return fn.apply(null, arguments);\n }\n\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n var fnNode = fnMap.get(fn);\n var cacheNode;\n\n if (fnNode === undefined) {\n cacheNode = createCacheNode();\n fnMap.set(fn, cacheNode);\n } else {\n cacheNode = fnNode;\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n var arg = arguments[i];\n\n if (typeof arg === 'function' || typeof arg === 'object' && arg !== null) {\n // Objects go into a WeakMap\n var objectCache = cacheNode.o;\n\n if (objectCache === null) {\n cacheNode.o = objectCache = new WeakMap();\n }\n\n var objectNode = objectCache.get(arg);\n\n if (objectNode === undefined) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n // Primitives go into a regular Map\n var primitiveCache = cacheNode.p;\n\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = new Map();\n }\n\n var primitiveNode = primitiveCache.get(arg);\n\n if (primitiveNode === undefined) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n\n if (cacheNode.s === TERMINATED) {\n return cacheNode.v;\n }\n\n if (cacheNode.s === ERRORED) {\n throw cacheNode.v;\n }\n\n try {\n // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.\n var result = fn.apply(null, arguments);\n var terminatedNode = cacheNode;\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n } catch (error) {\n // We store the first error that's thrown and rethrow it.\n var erroredNode = cacheNode;\n erroredNode.s = ERRORED;\n erroredNode.v = error;\n throw error;\n }\n };\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher$1.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\nfunction useCacheRefresh() {\n var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional\n\n return dispatcher.useCacheRefresh();\n}\nfunction use(usable) {\n var dispatcher = resolveDispatcher();\n return dispatcher.use(usable);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe[incompatible-use] This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement$1(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement$1(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement$1(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n }\n }\n}\n\nvar REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object' || !node) {\n return;\n }\n\n if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n if (type.$$typeof === REACT_CLIENT_REFERENCE) {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement$1.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement$1.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nvar ContextRegistry = ReactSharedInternals.ContextRegistry;\nfunction createServerContext(globalName, defaultValue) {\n\n var wasDefined = true;\n\n if (!ContextRegistry[globalName]) {\n wasDefined = false;\n var _context = {\n $$typeof: REACT_SERVER_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _defaultValue: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n _globalName: globalName\n };\n _context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: _context\n };\n\n {\n var hasWarnedAboutUsingConsumer;\n _context._currentRenderer = null;\n _context._currentRenderer2 = null;\n Object.defineProperties(_context, {\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingConsumer) {\n error('Consumer pattern is not supported by ReactServerContext');\n\n hasWarnedAboutUsingConsumer = true;\n }\n\n return null;\n }\n }\n });\n }\n\n ContextRegistry[globalName] = _context;\n }\n\n var context = ContextRegistry[globalName];\n\n if (context._defaultValue === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n context._defaultValue = defaultValue;\n\n if (context._currentValue === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n context._currentValue = defaultValue;\n }\n\n if (context._currentValue2 === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n context._currentValue2 = defaultValue;\n }\n } else if (wasDefined) {\n throw new Error(\"ServerContext: \" + globalName + \" already defined\");\n }\n\n return context;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n currentTransition._updatedFibers.clear();\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\n// number of `act` scopes on the stack.\n\nvar actScopeDepth = 0; // We only warn the first time you neglect to await an async `act` scope.\n\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // When ReactCurrentActQueue.current is not null, it signals to React that\n // we're currently inside an `act` scope. React will push all its tasks to\n // this queue instead of scheduling them with platform APIs.\n //\n // We set this to an empty array when we first enter an `act` scope, and\n // only unset it once we've left the outermost `act` scope — remember that\n // `act` calls can be nested.\n //\n // If we're already inside an `act` scope, reuse the existing queue.\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var prevActQueue = ReactCurrentActQueue.current;\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = ReactCurrentActQueue.current = prevActQueue !== null ? prevActQueue : []; // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n\n ReactCurrentActQueue.isBatchingLegacy = true;\n var result; // This tracks whether the `act` call is awaited. In certain cases, not\n // awaiting it is a mistake, so we will detect that and warn.\n\n var didAwaitActCall = false;\n\n try {\n // Reset this to `false` right before entering the React work loop. The\n // only place we ever read this fields is just below, right after running\n // the callback. So we don't need to reset after the callback runs.\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n result = callback();\n var didScheduleLegacyUpdate = ReactCurrentActQueue.didScheduleLegacyUpdate; // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && didScheduleLegacyUpdate) {\n flushActQueue(queue);\n } // `isBatchingLegacy` gets reset using the regular stack, not the async\n // one used to track `act` scopes. Why, you may be wondering? Because\n // that's how it worked before version 18. Yes, it's confusing! We should\n // delete legacy mode!!\n\n\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n } catch (error) {\n // `isBatchingLegacy` gets reset using the regular stack, not the async\n // one used to track `act` scopes. Why, you may be wondering? Because\n // that's how it worked before version 18. Yes, it's confusing! We should\n // delete legacy mode!!\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n popActScope(prevActQueue, prevActScopeDepth);\n throw error;\n }\n\n if (result !== null && typeof result === 'object' && // $FlowFixMe[method-unbinding]\n typeof result.then === 'function') {\n // A promise/thenable was returned from the callback. Wait for it to\n // resolve before flushing the queue.\n //\n // If `act` were implemented as an async function, this whole block could\n // be a single `await` call. That's really the only difference between\n // this branch and the next one.\n var thenable = result; // Warn if the an `act` call with an async scope is not awaited. In a\n // future release, consider making this an error.\n\n queueSeveralMicrotasks(function () {\n if (!didAwaitActCall && !didWarnNoAwaitAct) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = true;\n thenable.then(function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n\n if (prevActScopeDepth === 0) {\n // We're exiting the outermost `act` scope. Flush the queue.\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return (// Recursively flush tasks scheduled by a microtask.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject)\n );\n });\n } catch (error) {\n // `thenable` might not be a real promise, and `flushActQueue`\n // might throw, so we need to wrap `flushActQueue` in a\n // try/catch.\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n reject(error);\n });\n }\n };\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current\n // scope immediately.\n\n popActScope(prevActQueue, prevActScopeDepth);\n\n if (prevActScopeDepth === 0) {\n // We're exiting the outermost `act` scope. Flush the queue.\n flushActQueue(queue); // If the queue is not empty, it implies that we intentionally yielded\n // to the main thread, because something suspended. We will continue\n // in an asynchronous task.\n //\n // Warn if something suspends but the `act` call is not awaited.\n // In a future release, consider making this an error.\n\n if (queue.length !== 0) {\n queueSeveralMicrotasks(function () {\n if (!didAwaitActCall && !didWarnNoAwaitAct) {\n didWarnNoAwaitAct = true;\n\n error('A component suspended inside an `act` scope, but the ' + '`act` call was not awaited. When testing React ' + 'components that depend on asynchronous data, you must ' + 'await the result:\\n\\n' + 'await act(() => ...)');\n }\n });\n } // Like many things in this module, this is next part is confusing.\n //\n // We do not currently require every `act` call that is passed a\n // callback to be awaited, through arguably we should. Since this\n // callback was synchronous, we need to exit the current scope before\n // returning.\n //\n // However, if thenable we're about to return *is* awaited, we'll\n // immediately restore the current scope. So it shouldn't observable.\n //\n // This doesn't affect the case where the scope callback is async,\n // because we always require those calls to be awaited.\n //\n // TODO: In a future version, consider always requiring all `act` calls\n // to be awaited, regardless of whether the callback is sync or async.\n\n\n ReactCurrentActQueue.current = null;\n }\n\n return {\n then: function (resolve, reject) {\n didAwaitActCall = true;\n\n if (prevActScopeDepth === 0) {\n // If the `act` call is awaited, restore the queue we were\n // using before (see long comment above) so we can flush it.\n ReactCurrentActQueue.current = queue;\n enqueueTask(function () {\n return (// Recursively flush tasks scheduled by a microtask.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject)\n );\n });\n } else {\n resolve(returnValue);\n }\n }\n };\n }\n }\n}\n\nfunction popActScope(prevActQueue, prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n // Check if any tasks were scheduled asynchronously.\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n if (queue.length !== 0) {\n // Async tasks were scheduled, mostly likely in a microtask.\n // Keep flushing until there are no more.\n try {\n flushActQueue(queue); // The work we just performed may have schedule additional async\n // tasks. Wait a macrotask and check again.\n\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n } catch (error) {\n // Leave remaining tasks on the queue if something throws.\n reject(error);\n }\n } else {\n // The queue is empty. We can finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n ReactCurrentActQueue.didUsePromise = false;\n var continuation = callback(false);\n\n if (continuation !== null) {\n if (ReactCurrentActQueue.didUsePromise) {\n // The component just suspended. Yield to the main thread in\n // case the promise is already resolved. If so, it will ping in\n // a microtask and we can resume without unwinding the stack.\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n\n callback = continuation;\n } else {\n break;\n }\n } while (true);\n } // We flushed the entire queue.\n\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue.splice(0, i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n} // Some of our warnings attempt to detect if the `act` call is awaited by\n// checking in an asynchronous task. Wait a few microtasks before checking. The\n// only reason one isn't sufficient is we want to accommodate the case where an\n// `act` call is returned from an async function without first being awaited,\n// since that's a somewhat common pattern. If you do this too many times in a\n// nested sequence, you might get a warning, but you can always fix by awaiting\n// the call.\n//\n// A macrotask would also work (and is the fallback) but depending on the test\n// environment it may cause the warning to fire too late.\n\n\nvar queueSeveralMicrotasks = typeof queueMicrotask === 'function' ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n} : enqueueTask;\n\nvar createElement = createElementWithValidation ;\nvar cloneElement = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cache = cache;\nexports.cloneElement = cloneElement;\nexports.createContext = createContext;\nexports.createElement = createElement;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.createServerContext = createServerContext;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.unstable_useCacheRefresh = useCacheRefresh;\nexports.use = use;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC9janMvcmVhY3QuZGV2ZWxvcG1lbnQuanMiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFYTs7QUFFYixJQUFJLElBQXFDO0FBQ3pDOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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nR5cGUpIHx8ICdNZW1vJztcblxuICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgbGF6eUNvbXBvbmVudCA9IHR5cGU7XG4gICAgICAgICAgdmFyIHBheWxvYWQgPSBsYXp5Q29tcG9uZW50Ll9wYXlsb2FkO1xuICAgICAgICAgIHZhciBpbml0ID0gbGF6eUNvbXBvbmVudC5faW5pdDtcblxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gZ2V0Q29tcG9uZW50TmFtZUZyb21UeXBlKGluaXQocGF5bG9hZCkpO1xuICAgICAgICAgIH0gY2F0Y2ggKHgpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFJFQUNUX1NFUlZFUl9DT05URVhUX1RZUEU6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgY29udGV4dDIgPSB0eXBlO1xuICAgICAgICAgIHJldHVybiAoY29udGV4dDIuZGlzcGxheU5hbWUgfHwgY29udGV4dDIuX2dsb2JhbE5hbWUpICsgJy5Qcm92aWRlcic7XG4gICAgICAgIH1cblxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBudWxsO1xufVxuXG4vLyAkRmxvd0ZpeE1lW21ldGhvZC11bmJpbmRpbmddXG52YXIgaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuXG52YXIgUkVTRVJWRURfUFJPUFMgPSB7XG4gIGtleTogdHJ1ZSxcbiAgcmVmOiB0cnVlLFxuICBfX3NlbGY6IHRydWUsXG4gIF9fc291cmNlOiB0cnVlXG59O1xudmFyIHNwZWNpYWxQcm9wS2V5V2FybmluZ1Nob3duLCBzcGVjaWFsUHJvcFJlZldhcm5pbmdTaG93biwgZGlkV2FybkFib3V0U3RyaW5nUmVmcztcblxue1xuICBkaWRXYXJuQWJvdXRTdHJpbmdSZ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zdXBwb3J0ZWQgYW5kIHdpbGwgYmUgcmVtb3ZlZCBpbiAnICsgJ2EgZnV0dXJlIG1ham9yIHJlbGVhc2UuIERpZCB5b3UgbWVhbiB0byByZW5kZXIgPENvbnRleHQuUHJvdmlkZXI+IGluc3RlYWQ/Jyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGNvbnRleHQuUHJvdmlkZXI7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF9Qcm92aWRlcikge1xuICAgICAgICAgIGNvbnRleHQuUHJvdmlkZXIgPSBfUHJvdmlkZXI7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBfY3VycmVudFZhbHVlOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF9jdXJyZW50VmFsdWUpIHtcbiAgICAgICAgICBjb250ZXh0Ll9jdXJyZW50VmFsdWUgPSBfY3VycmVudFZhbHVlO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgX2N1cnJlbnRWYWx1ZTI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTI7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF9jdXJyZW50VmFsdWUyKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlMiA9IF9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgX3RocmVhZENvdW50OiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll90aHJlYWRDb3VudDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAoX3R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bmZvOiBwcm9wcyxcbiAgICAgICAgbG9nOiBwcm9wcyxcbiAgICAgICAgd2FybjogcHJvcHMsXG4gICAgICAgIGVycm9yOiBwcm9wcyxcbiAgICAgICAgZ3JvdXA6IHByb3BzLFxuICAgICAgICBncm91cENvbGxhcHNlZDogcHJvcHMsXG4gICAgICAgIGdyb3VwRW5kOiBwcm9wc1xuICAgICAgfSk7XG4gICAgICAvKiBlc2xpbnQtZW5hYmxlIHJlYWN0LWludGVybmFsL25vLXByb2R1Y3Rpb24tbG9nZ2luZyAqL1xuICAgIH1cblxuICAgIGRpc2FibGVkRGVwdGgrKztcbiAgfVxufVxuZnVuY3Rpb24gcmVlbmFibGVMb2dzKCkge1xuICB7XG4gICAgZGlzYWJsZWREZXB0aC0tO1xuXG4gICAgaWYgKGRpc2FibGVkRGVwdGggPT09IDApIHtcbiAgICAgIC8qIGVzbGludC1kaXNhYmxlIHJlYWN0LWludGVybmFsL25vLXByb2R1Y3Rpb24tbG9nZ2luZyAqL1xuICAgICAgdmFyIHByb3BzID0ge1xuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgIHdyaXRhYmxlOiB0cnVlXG4gICAgICB9OyAvLyAkRmxvd0ZpeE1lW2Nhbm5vdC13cml0ZV0gRmxvdyB0aGlua3MgY29uc29sZSBpcyBpbW11dGFibGUuXG5cbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzKGNvbnNvbGUsIHtcbiAgICAgICAgbG9nOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZMb2dcbiAgICAgICAgfSksXG4gICAgICAgIGluZm86IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkluZm9cbiAgICAgICAgfSksXG4gICAgICAgIHdhcm46IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldldhc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gICAgICAgICAvLyBUaGUgbmV4dCBvbmUgdGhhdCBpc24ndCB0aGUgc2FtZSBzaG91bGQgYmUgb3VyIG1hdGNoIHRob3VnaC5cblxuICAgICAgICAgICAgICBpZiAoYyA8IDAgfHwgc2FtcGxlTGluZXNbc10gIT09IGNvbnRyb2xMaW5lc1tjXSkge1xuICAgICAgICAgICAgICAgIC8vIFY4IGFkZHMgYSBcIm5ld1wiIHByZWZpeCBmb3IgbmF0aXZlIGNsYXNzZXMuIExldCdzIHJlbW92ZSBpdCB0byBtYWtlIGl0IHByZXR0aWVyLlxuICAgICAgICAgICAgICAgIHZhciBfZnJhbWUgPSAnXFxuJyArIHNhbXBsZUxpbmVzW3NdLnJlcGxhY2UoJyBhdCBuZXcgJywgJyBhdCAnKTsgLy8gSWYgb3VyIGNvbXBvbmVudCBmcmFtZSBpcyBsYWJlbGVkIFwiPGFub255bW91cz5cIlxuICAgICAgICAgICAgICAgIC8vIGJ1dCB3ZSBoYXZlIGEgdXNlci1wcm92aWRlZCBcImRpc3BsYXlOYW1lXCJcbiAgICAgICAgICAgICAgICAvLyBzcGxpY2UgaXQgaW4gdG8gbWFrZSB0aGUgc3RhY2sgbW9yZSByZWFkYWJsZS5cblxuXG4gICAgICAgICAgICAgICAgaWYgKGZuLmRpc3BsYXlOYW1lICYmIF9mcmFtZS5pbmNsdWRlcygnPGFub255bW91cz4nKSkge1xuICAgICAgICAgICAgICAgICAgX2ZyYW1lID0gX2ZyYW1lLnJlcGxhY2UoJzxhbm9ueW1vdXM+JywgZm4uZGlzcGxheU5hbWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZm4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50RnJhbWVDYWNoZS5zZXQoZm4sIF9mcmFtZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSAv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YGFjdGAgc2NvcGUuIEZsdXNoIHRoZSBxdWV1ZS5cbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBmbHVzaEFjdFF1ZXVlKHF1ZXVlKTtcbiAgICAgICAgICAgICAgICBlbnF1ZXVlVGFzayhmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gKC8vIFJlY3Vyc2l2ZWx5IGZsdXNoIHRhc2tzIHNjaGVkdWxlZCBieSBhIG1pY3JvdGFzay5cbiAgICAgICAgICAgICAgICAgICAgcmVjdXJzaXZlbHlGbHVzaEFzeW5jQWN0V29yayhyZXR1cm5WYWx1ZSwgcmVzb2x2ZSwgcmVqZWN0KVxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAvLyBgdGhlbmFibGVgIG1pZ2h0IG5vdCBiZSBhIHJlYWwgcHJvbWlzZSwgYW5kIGBmbHVzaEFjdFF1ZXVlYFxuICAgICAgICAgICAgICAgIC8vIG1pZ2h0IHRocm93LCBzbyB3ZSBuZWVkIHRvIHdyYXAgYGZsdXNoQWN0UXVldWVgIGluIGFcbiAgICAgICAgICAgICAgICAvLyB0cnkvY2F0Y2guXG4gICAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzb2x2ZShyZXR1cm5WYWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICBwb3BBY3RTY29wZShwcmV2QWN0UXVldWUsIHByZXZBY3RTY29wZURlcHRoKTtcbiAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfSBlbHNlIHt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BpZiAoIWlzRmx1c2hpbmcpIHtcbiAgICAgIC8vIFByZXZlbnQgcmUtZW50cmFuY2UuXG4gICAgICBpc0ZsdXNoaW5nID0gdHJ1ZTtcbiAgICAgIHZhciBpID0gMDtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgZm9yICg7IGkgPCBxdWV1ZS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIHZhciBjYWxsYmFjayA9IHF1ZXVlW2ldO1xuXG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgUmVhY3RDdXJyZW50QWN0UXVldWUuZGlkVXNlUHJvbWlzZSA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIGNvbnRpbnVhdGlvbiA9IGNhbGxiYWNrKGZhbHNlKTtcblxuICAgICAgICAgICAgaWYgKGNvbnRpbnVhdGlvbiAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBpZiAoUmVhY3RDdXJyZW50QWN0UXVldWUuZGlkVXNlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgIC8vIFRoZSBjb21wb25lbnQganVzdCBzdXNwZW5kZWQuIFlpZWxkIHRvIHRoZSBtYWluIHRocmVhZCBpblxuICAgICAgICAgICAgICAgIC8vIGNhc2UgdGhlIHByb21pc2UgaXMgYWxyZWFkeSByZXNvbHZlZC4gSWYgc28sIGl0IHdpbGwgcGluZyBpblxuICAgICAgICAgICAgICAgIC8vIGEgbWljcm90YXNrIGFuZCB3ZSBjYW4gcmVzdW1lIHdpdGhvdXQgdW53aW5kaW5nIHRoZSBzdGFjay5cbiAgICAgICAgICAgICAgICBxdWV1ZVtpXSA9IGNhbGxiYWNrO1xuICAgICAgICAgICAgICAgIHF1ZXVlLnNwbGljZSgwLCBpKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjYWxsYmFjayA9IGNvbnRpbnVhdGlvbjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGJyZW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2lzdGVySW50ZXJuYWxNb2R1bGVTdG9wKG5ldyBFcnJvcigpKTtcbn1cbiAgICAgICAgXG4gIH0pKCk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react/cjs/react.development.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/react/index.js": /*!********************************************************!*\ !*** ./node_modules/next/dist/compiled/react/index.js ***! \********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ \"(app-client)/./node_modules/next/dist/compiled/react/cjs/react.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC9pbmRleC5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFJLEtBQXFDLEVBQUUsRUFFMUMsQ0FBQztBQUNGLEVBQUUsdUpBQXNEO0FBQ3hEIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvY29tcGlsZWQvcmVhY3QvaW5kZXguanM/ZmQ3MCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbmlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ3Byb2R1Y3Rpb24nKSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvcmVhY3QucHJvZHVjdGlvbi5taW4uanMnKTtcbn0gZWxzZSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvcmVhY3QuZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js": /*!********************************************************************************!*\ !*** ./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js ***! \********************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var enableSchedulerDebugging = false;\nvar enableProfiling = false;\nvar frameYieldMs = 5;\n\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n siftUp(heap, node, index);\n}\nfunction peek(heap) {\n return heap.length === 0 ? null : heap[0];\n}\nfunction pop(heap) {\n if (heap.length === 0) {\n return null;\n }\n\n var first = heap[0];\n var last = heap.pop();\n\n if (last !== first) {\n heap[0] = last;\n siftDown(heap, last, 0);\n }\n\n return first;\n}\n\nfunction siftUp(heap, node, i) {\n var index = i;\n\n while (index > 0) {\n var parentIndex = index - 1 >>> 1;\n var parent = heap[parentIndex];\n\n if (compare(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node;\n heap[index] = parent;\n index = parentIndex;\n } else {\n // The parent is smaller. Exit.\n return;\n }\n }\n}\n\nfunction siftDown(heap, node, i) {\n var index = i;\n var length = heap.length;\n var halfLength = length >>> 1;\n\n while (index < halfLength) {\n var leftIndex = (index + 1) * 2 - 1;\n var left = heap[leftIndex];\n var rightIndex = leftIndex + 1;\n var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n if (compare(left, node) < 0) {\n if (rightIndex < length && compare(right, left) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n heap[index] = left;\n heap[leftIndex] = node;\n index = leftIndex;\n }\n } else if (rightIndex < length && compare(right, node) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n // Neither child is smaller. Exit.\n return;\n }\n }\n}\n\nfunction compare(a, b) {\n // Compare sort index first, then task id.\n var diff = a.sortIndex - b.sortIndex;\n return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\nexports.unstable_now = void 0;\nvar hasPerformanceNow = // $FlowFixMe[method-unbinding]\ntypeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n var localPerformance = performance;\n\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date;\n var initialTime = localDate.now();\n\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\n\nvar maxSigned31BitInt = 1073741823; // Times out immediately\n\nvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\nvar USER_BLOCKING_PRIORITY_TIMEOUT = 250;\nvar NORMAL_PRIORITY_TIMEOUT = 5000;\nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\nvar IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.\n\nvar localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;\nvar localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;\nvar localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom\n\ntypeof navigator !== 'undefined' && // $FlowFixMe[prop-missing]\nnavigator.scheduling !== undefined && // $FlowFixMe[incompatible-type]\nnavigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;\n\nfunction advanceTimers(currentTime) {\n // Check for tasks that are no longer delayed and add them to the queue.\n var timer = peek(timerQueue);\n\n while (timer !== null) {\n if (timer.callback === null) {\n // Timer was cancelled.\n pop(timerQueue);\n } else if (timer.startTime <= currentTime) {\n // Timer fired. Transfer to the task queue.\n pop(timerQueue);\n timer.sortIndex = timer.expirationTime;\n push(taskQueue, timer);\n } else {\n // Remaining timers are pending.\n return;\n }\n\n timer = peek(timerQueue);\n }\n}\n\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = false;\n advanceTimers(currentTime);\n\n if (!isHostCallbackScheduled) {\n if (peek(taskQueue) !== null) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n }\n }\n}\n\nfunction flushWork(hasTimeRemaining, initialTime) {\n\n\n isHostCallbackScheduled = false;\n\n if (isHostTimeoutScheduled) {\n // We scheduled a timeout but it's no longer needed. Cancel it.\n isHostTimeoutScheduled = false;\n cancelHostTimeout();\n }\n\n isPerformingWork = true;\n var previousPriorityLevel = currentPriorityLevel;\n\n try {\n var currentTime; if (enableProfiling) ; else {\n // No catch in prod code path.\n return workLoop(hasTimeRemaining, initialTime);\n }\n } finally {\n currentTask = null;\n currentPriorityLevel = previousPriorityLevel;\n isPerformingWork = false;\n }\n}\n\nfunction workLoop(hasTimeRemaining, initialTime) {\n var currentTime = initialTime;\n advanceTimers(currentTime);\n currentTask = peek(taskQueue);\n\n while (currentTask !== null && !(enableSchedulerDebugging )) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n // This currentTask hasn't expired, and we've reached the deadline.\n break;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n var callback = currentTask.callback;\n\n if (typeof callback === 'function') {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentTask.callback = null; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n currentPriorityLevel = currentTask.priorityLevel; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n var continuationCallback = callback(didUserCallbackTimeout);\n currentTime = exports.unstable_now();\n\n if (typeof continuationCallback === 'function') {\n // If a continuation is returned, immediately yield to the main thread\n // regardless of how much time is left in the current time slice.\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentTask.callback = continuationCallback;\n\n advanceTimers(currentTime);\n return true;\n } else {\n\n if (currentTask === peek(taskQueue)) {\n pop(taskQueue);\n }\n\n advanceTimers(currentTime);\n }\n } else {\n pop(taskQueue);\n }\n\n currentTask = peek(taskQueue);\n } // Return whether there's additional work\n\n\n if (currentTask !== null) {\n return true;\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n\n return false;\n }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n case LowPriority:\n case IdlePriority:\n break;\n\n default:\n priorityLevel = NormalPriority;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_next(eventHandler) {\n var priorityLevel;\n\n switch (currentPriorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n // Shift down to normal priority\n priorityLevel = NormalPriority;\n break;\n\n default:\n // Anything lower than normal priority should remain at the current level.\n priorityLevel = currentPriorityLevel;\n break;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_wrapCallback(callback) {\n var parentPriorityLevel = currentPriorityLevel; // $FlowFixMe[incompatible-return]\n // $FlowFixMe[missing-this-annot]\n\n return function () {\n // This is a fork of runWithPriority, inlined for performance.\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n var currentTime = exports.unstable_now();\n var startTime;\n\n if (typeof options === 'object' && options !== null) {\n var delay = options.delay;\n\n if (typeof delay === 'number' && delay > 0) {\n startTime = currentTime + delay;\n } else {\n startTime = currentTime;\n }\n } else {\n startTime = currentTime;\n }\n\n var timeout;\n\n switch (priorityLevel) {\n case ImmediatePriority:\n timeout = IMMEDIATE_PRIORITY_TIMEOUT;\n break;\n\n case UserBlockingPriority:\n timeout = USER_BLOCKING_PRIORITY_TIMEOUT;\n break;\n\n case IdlePriority:\n timeout = IDLE_PRIORITY_TIMEOUT;\n break;\n\n case LowPriority:\n timeout = LOW_PRIORITY_TIMEOUT;\n break;\n\n case NormalPriority:\n default:\n timeout = NORMAL_PRIORITY_TIMEOUT;\n break;\n }\n\n var expirationTime = startTime + timeout;\n var newTask = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: startTime,\n expirationTime: expirationTime,\n sortIndex: -1\n };\n\n if (startTime > currentTime) {\n // This is a delayed task.\n newTask.sortIndex = startTime;\n push(timerQueue, newTask);\n\n if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n // All tasks are delayed, and this is the task with the earliest delay.\n if (isHostTimeoutScheduled) {\n // Cancel an existing timeout.\n cancelHostTimeout();\n } else {\n isHostTimeoutScheduled = true;\n } // Schedule a timeout.\n\n\n requestHostTimeout(handleTimeout, startTime - currentTime);\n }\n } else {\n newTask.sortIndex = expirationTime;\n push(taskQueue, newTask);\n // wait until the next time we yield.\n\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n }\n\n return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n}\n\nfunction unstable_getFirstCallbackNode() {\n return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n // remove from the queue because you can't remove arbitrary nodes from an\n // array based heap, only the first one.)\n\n\n task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n return currentPriorityLevel;\n}\n\nvar isMessageLoopRunning = false;\nvar scheduledHostCallback = null;\nvar taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n// thread, like user events. By default, it yields multiple times per frame.\n// It does not attempt to align with frame boundaries, since most tasks don't\n// need to be frame aligned; for those that do, use requestAnimationFrame.\n\nvar frameInterval = frameYieldMs;\nvar startTime = -1;\n\nfunction shouldYieldToHost() {\n var timeElapsed = exports.unstable_now() - startTime;\n\n if (timeElapsed < frameInterval) {\n // The main thread has only been blocked for a really short amount of time;\n // smaller than a single frame. Don't yield yet.\n return false;\n } // The main thread has been blocked for a non-negligible amount of time. We\n\n\n return true;\n}\n\nfunction requestPaint() {\n\n}\n\nfunction forceFrameRate(fps) {\n if (fps < 0 || fps > 125) {\n // Using console['error'] to evade Babel and ESLint\n console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n return;\n }\n\n if (fps > 0) {\n frameInterval = Math.floor(1000 / fps);\n } else {\n // reset the framerate\n frameInterval = frameYieldMs;\n }\n}\n\nvar performWorkUntilDeadline = function () {\n if (scheduledHostCallback !== null) {\n var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread\n // has been blocked.\n\n startTime = currentTime;\n var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the\n // error can be observed.\n //\n // Intentionally not using a try-catch, since that makes some debugging\n // techniques harder. Instead, if `scheduledHostCallback` errors, then\n // `hasMoreWork` will remain true, and we'll continue the work loop.\n\n var hasMoreWork = true;\n\n try {\n // $FlowFixMe[not-a-function] found when upgrading Flow\n hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n } finally {\n if (hasMoreWork) {\n // If there's more work, schedule the next message event at the end\n // of the preceding one.\n schedulePerformWorkUntilDeadline();\n } else {\n isMessageLoopRunning = false;\n scheduledHostCallback = null;\n }\n }\n } else {\n isMessageLoopRunning = false;\n } // Yielding to the browser will give it a chance to paint, so we can\n};\n\nvar schedulePerformWorkUntilDeadline;\n\nif (typeof localSetImmediate === 'function') {\n // Node.js and old IE.\n // There's a few reasons for why we prefer setImmediate.\n //\n // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.\n // (Even though this is a DOM fork of the Scheduler, you could get here\n // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)\n // https://github.com/facebook/react/issues/20756\n //\n // But also, it runs earlier which is the semantic we want.\n // If other browsers ever implement it, it's better to use it.\n // Although both of these would be inferior to native scheduling.\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\n} else if (typeof MessageChannel !== 'undefined') {\n // DOM and Worker environments.\n // We prefer MessageChannel because of the 4ms setTimeout clamping.\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else {\n // We should only fallback here in non-browser environments.\n schedulePerformWorkUntilDeadline = function () {\n // $FlowFixMe[not-a-function] nullable value\n localSetTimeout(performWorkUntilDeadline, 0);\n };\n}\n\nfunction requestHostCallback(callback) {\n scheduledHostCallback = callback;\n\n if (!isMessageLoopRunning) {\n isMessageLoopRunning = true;\n schedulePerformWorkUntilDeadline();\n }\n}\n\nfunction requestHostTimeout(callback, ms) {\n // $FlowFixMe[not-a-function] nullable value\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\n\nfunction cancelHostTimeout() {\n // $FlowFixMe[not-a-function] nullable value\n localClearTimeout(taskTimeoutID);\n taskTimeoutID = -1;\n}\nvar unstable_Profiling = null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_forceFrameRate = forceFrameRate;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9zY2hlZHVsZXIvY2pzL3NjaGVkdWxlci5kZXZlbG9wbWVudC5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRWE7O0FBRWIsSUFBSSxJQUFxQztBQUN6Qzs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0NBQWtDOztBQUVsQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBUTtBQUNSO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7QUFDQTtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNB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GVfcmVxdWVzdFBhaW50ID0gcmVxdWVzdFBhaW50O1xuZXhwb3J0cy51bnN0YWJsZV9ydW5XaXRoUHJpb3JpdHkgPSB1bnN0YWJsZV9ydW5XaXRoUHJpb3JpdHk7XG5leHBvcnRzLnVuc3RhYmxlX3NjaGVkdWxlQ2FsbGJhY2sgPSB1bnN0YWJsZV9zY2hlZHVsZUNhbGxiYWNrO1xuZXhwb3J0cy51bnN0YWJsZV9zaG91bGRZaWVsZCA9IHNob3VsZFlpZWxkVG9Ib3N0O1xuZXhwb3J0cy51bnN0YWJsZV93cmFwQ2FsbGJhY2sgPSB1bnN0YWJsZV93cmFwQ2FsbGJhY2s7XG4gICAgICAgICAgLyogZ2xvYmFsIF9fUkVBQ1RfREVWVE9PTFNfR0xPQkFMX0hPT0tfXyAqL1xuaWYgKFxuICB0eXBlb2YgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fICE9PSAndW5kZWZpbmVkJyAmJlxuICB0eXBlb2YgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fLnJlZ2lzdGVySW50ZXJuYWxNb2R1bGVTdG9wID09PVxuICAgICdmdW5jdGlvbidcbikge1xuICBfX1JFQUNUX0RFVlRPT0xTX0dMT0JBTF9IT09LX18ucmVnaXN0ZXJJbnRlcm5hbE1vZHVsZVN0b3AobmV3IEVycm9yKCkpO1xufVxuICAgICAgICBcbiAgfSkoKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/scheduler/index.js": /*!************************************************************!*\ !*** ./node_modules/next/dist/compiled/scheduler/index.js ***! \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ \"(app-client)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9zY2hlZHVsZXIvaW5kZXguanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsSUFBSSxLQUFxQyxFQUFFLEVBRTFDLENBQUM7QUFDRixFQUFFLG1LQUEwRDtBQUM1RCIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3NjaGVkdWxlci9pbmRleC5qcz84MDJmIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9zY2hlZHVsZXIucHJvZHVjdGlvbi5taW4uanMnKTtcbn0gZWxzZSB7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvc2NoZWR1bGVyLmRldmVsb3BtZW50LmpzJyk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/scheduler/index.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js": /*!*************************************************************************************!*\ !*** ./node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js ***! \*************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { eval(__webpack_require__.ts("var __dirname = \"/\";\n(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;Object.defineProperty(r,\"__esModule\",{value:true});var n=\"<unknown>\";function parse(e){var r=e.split(\"\\n\");return r.reduce((function(e,r){var n=parseChrome(r)||parseWinjs(r)||parseGecko(r)||parseNode(r)||parseJSC(r);if(n){e.push(n)}return e}),[])}var a=/^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;var l=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;function parseChrome(e){var r=a.exec(e);if(!r){return null}var u=r[2]&&r[2].indexOf(\"native\")===0;var t=r[2]&&r[2].indexOf(\"eval\")===0;var i=l.exec(r[2]);if(t&&i!=null){r[2]=i[1];r[3]=i[2];r[4]=i[3]}return{file:!u?r[2]:null,methodName:r[1]||n,arguments:u?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var u=/^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;function parseWinjs(e){var r=u.exec(e);if(!r){return null}return{file:r[2],methodName:r[1]||n,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}}var t=/^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;var i=/(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;function parseGecko(e){var r=t.exec(e);if(!r){return null}var a=r[3]&&r[3].indexOf(\" > eval\")>-1;var l=i.exec(r[3]);if(a&&l!=null){r[3]=l[1];r[4]=l[2];r[5]=null}return{file:r[3],methodName:r[1]||n,arguments:r[2]?r[2].split(\",\"):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var s=/^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;function parseJSC(e){var r=s.exec(e);if(!r){return null}return{file:r[3],methodName:r[1]||n,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}}var o=/^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;function parseNode(e){var r=o.exec(e);if(!r){return null}return{file:r[2],methodName:r[1]||n,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}}r.parse=parse})();module.exports=e})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9zdGFja3RyYWNlLXBhcnNlci9zdGFjay10cmFjZS1wYXJzZXIuY2pzLmpzIiwibWFwcGluZ3MiOiI7QUFBQSxNQUFNLGFBQWEsbUVBQW1FLFNBQVMsS0FBSyxTQUFTLE1BQU0sUUFBUSxzQ0FBc0MsV0FBVyxFQUFFLGtCQUFrQixrQkFBa0Isb0JBQW9CLCtCQUErQiw4RUFBOEUsTUFBTSxVQUFVLFNBQVMsTUFBTSxrSkFBa0osc0NBQXNDLHdCQUF3QixnQkFBZ0IsT0FBTyxZQUFZLHVDQUF1QyxxQ0FBcUMsbUJBQW1CLGVBQWUsVUFBVSxVQUFVLFVBQVUsT0FBTyw4R0FBOEcsc0hBQXNILHVCQUF1QixnQkFBZ0IsT0FBTyxZQUFZLE9BQU8sbUZBQW1GLHdJQUF3SSxzREFBc0QsdUJBQXVCLGdCQUFnQixPQUFPLFlBQVksdUNBQXVDLG1CQUFtQixlQUFlLFVBQVUsVUFBVSxVQUFVLE9BQU8sa0hBQWtILHFFQUFxRSxxQkFBcUIsZ0JBQWdCLE9BQU8sWUFBWSxPQUFPLG1GQUFtRixzR0FBc0csc0JBQXNCLGdCQUFnQixPQUFPLFlBQVksT0FBTyxtR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kuZXhlYyhyWzNdKTtpZihhJiZsIT1udWxsKXtyWzNdPWxbMV07cls0XT1sWzJdO3JbNV09bnVsbH1yZXR1cm57ZmlsZTpyWzNdLG1ldGhvZE5hbWU6clsxXXx8bixhcmd1bWVudHM6clsyXT9yWzJdLnNwbGl0KFwiLFwiKTpbXSxsaW5lTnVtYmVyOnJbNF0/K3JbNF06bnVsbCxjb2x1bW46cls1XT8rcls1XTpudWxsfX12YXIgcz0vXlxccyooPzooW15AXSopKD86XFwoKC4qPylcXCkpP0ApPyhcXFMuKj8pOihcXGQrKSg/OjooXFxkKykpP1xccyokL2k7ZnVuY3Rpb24gcGFyc2VKU0MoZSl7dmFyIHI9cy5leGVjKGUpO2lmKCFyKXtyZXR1cm4gbnVsbH1yZXR1cm57ZmlsZTpyWzNdLG1ldGhvZE5hbWU6clsxXXx8bixhcmd1bWVudHM6W10sbGluZU51bWJlcjorcls0XSxjb2x1bW46cls1XT8rcls1XTpudWxsfX12YXIgbz0vXlxccyphdCAoPzooKD86XFxbb2JqZWN0IG9iamVjdFxcXSk/W15cXFxcL10rKD86IFxcW2FzIFxcUytcXF0pPykgKT9cXCg/KC4qPyk6KFxcZCspKD86OihcXGQrKSk/XFwpP1xccyokL2k7ZnVuY3Rpb24gcGFyc2VOb2RlKGUpe3ZhciByPW8uZXhlYyhlKTtpZighcil7cmV0dXJuIG51bGx9cmV0dXJue2ZpbGU6clsyXSxtZXRob2ROYW1lOnJbMV18fG4sYXJndW1lbnRzOltdLGxpbmVOdW1iZXI6K3JbM10sY29sdW1uOnJbNF0/K3JbNF06bnVsbH19ci5wYXJzZT1wYXJzZX0pKCk7bW9kdWxlLmV4cG9ydHM9ZX0pKCk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/server/app-render/get-segment-param.js": /*!***********************************************************************!*\ !*** ./node_modules/next/dist/server/app-render/get-segment-param.js ***! \***********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getSegmentParam\", ({\n enumerable: true,\n get: function() {\n return getSegmentParam;\n }\n}));\nconst _interceptionroutes = __webpack_require__(/*! ../future/helpers/interception-routes */ \"(app-client)/./node_modules/next/dist/server/future/helpers/interception-routes.js\");\nfunction getSegmentParam(segment) {\n const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker)=>segment.startsWith(marker));\n // if an interception marker is part of the path segment, we need to jump ahead\n // to the relevant portion for param parsing\n if (interceptionMarker) {\n segment = segment.slice(interceptionMarker.length);\n }\n if (segment.startsWith(\"[[...\") && segment.endsWith(\"]]\")) {\n return {\n type: \"optional-catchall\",\n param: segment.slice(5, -2)\n };\n }\n if (segment.startsWith(\"[...\") && segment.endsWith(\"]\")) {\n return {\n type: \"catchall\",\n param: segment.slice(4, -1)\n };\n }\n if (segment.startsWith(\"[\") && segment.endsWith(\"]\")) {\n return {\n type: \"dynamic\",\n param: segment.slice(1, -1)\n };\n }\n return null;\n}\n\n//# sourceMappingURL=get-segment-param.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zZXJ2ZXIvYXBwLXJlbmRlci9nZXQtc2VnbWVudC1wYXJhbS5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLG1EQUFrRDtBQUNsRDtBQUNBO0FBQ0E7QUFDQTtBQUNBLENBQUMsRUFBQztBQUNGLDRCQUE0QixtQkFBTyxDQUFDLGlJQUF1QztBQUMzRTtBQUNBO0FBQ0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YWhlYWRcbiAgICAvLyB0byB0aGUgcmVsZXZhbnQgcG9ydGlvbiBmb3IgcGFyYW0gcGFyc2luZ1xuICAgIGlmIChpbnRlcmNlcHRpb25NYXJrZXIpIHtcbiAgICAgICAgc2VnbWVudCA9IHNlZ21lbnQuc2xpY2UoaW50ZXJjZXB0aW9uTWFya2VyLmxlbmd0aCk7XG4gICAgfVxuICAgIGlmIChzZWdtZW50LnN0YXJ0c1dpdGgoXCJbWy4uLlwiKSAmJiBzZWdtZW50LmVuZHNXaXRoKFwiXV1cIikpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFwib3B0aW9uYWwtY2F0Y2hhbGxcIixcbiAgICAgICAgICAgIHBhcmFtOiBzZWdtZW50LnNsaWNlKDUsIC0yKVxuICAgICAgICB9O1xuICAgIH1cbiAgICBpZiAoc2VnbWVudC5zdGFydHNXaXRoKFwiWy4uLlwiKSAmJiBzZWdtZW50LmVuZHNXaXRoKFwiXVwiKSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogXCJjYXRjaGFsbFwiLFxuICAgICAgICAgICAgcGFyYW06IHNlZ21lbnQuc2xpY2UoNCwgLTEpXG4gICAgICAgIH07XG4gICAgfVxuICAgIGlmIChzZWdtZW50LnN0YXJ0c1dpdGgoXCJbXCIpICYmIHNlZ21lbnQuZW5kc1dpdGgoXCJdXCIpKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBcImR5bmFtaWNcIixcbiAgICAgICAgICAgIHBhcmFtOiBzZWdtZW50LnNsaWNlKDEsIC0xKVxuICAgICAgICB9O1xuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Z2V0LXNlZ21lbnQtcGFyYW0uanMubWFwIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/server/app-render/get-segment-param.js\n")); /***/ }), /***/ "(app-client)/./node_modules/next/dist/server/future/helpers/interception-routes.js": /*!*****************************************************************************!*\ !*** ./node_modules/next/dist/server/future/helpers/interception-routes.js ***! \*****************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n INTERCEPTION_ROUTE_MARKERS: function() {\n return INTERCEPTION_ROUTE_MARKERS;\n },\n isInterceptionRouteAppPath: function() {\n return isInterceptionRouteAppPath;\n },\n extractInterceptionRouteInformation: function() {\n return extractInterceptionRouteInformation;\n }\n});\nconst _apppaths = __webpack_require__(/*! ../../../shared/lib/router/utils/app-paths */ \"(app-client)/./node_modules/next/dist/shared/lib/router/utils/app-paths.js\");\nconst INTERCEPTION_ROUTE_MARKERS = [\n \"(..)(..)\",\n \"(.)\",\n \"(..)\",\n \"(...)\"\n];\nfunction isInterceptionRouteAppPath(path) {\n // TODO-APP: add more serious validation\n return path.split(\"/\").find((segment)=>INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m))) !== undefined;\n}\nfunction extractInterceptionRouteInformation(path) {\n let interceptingRoute, marker, interceptedRoute;\n for (const segment of path.split(\"/\")){\n marker = INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));\n if (marker) {\n [interceptingRoute, interceptedRoute] = path.split(marker, 2);\n break;\n }\n }\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);\n }\n interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n ;\n switch(marker){\n case \"(.)\":\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === \"/\") {\n interceptedRoute = `/${interceptedRoute}`;\n } else {\n interceptedRoute = interceptingRoute + \"/\" + interceptedRoute;\n }\n break;\n case \"(..)\":\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === \"/\") {\n throw new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`);\n }\n interceptedRoute = interceptingRoute.split(\"/\").slice(0, -1).concat(interceptedRoute).join(\"/\");\n break;\n case \"(...)\":\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = \"/\" + interceptedRoute;\n break;\n case \"(..)(..)\":\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n const splitInterceptingRoute = interceptingRoute.split(\"/\");\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`);\n }\n interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join(\"/\");\n break;\n default:\n throw new Error(\"Invariant: unexpected marker\");\n }\n return {\n interceptingRoute,\n interceptedRoute\n };\n}\n\n//# sourceMappingURL=interception-routes.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zZXJ2ZXIvZnV0dXJlL2hlbHBlcnMvaW50ZXJjZXB0aW9uLXJvdXRlcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLE1BQU0sQ0FJTDtBQUNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0EsQ0FBQztB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0ZWRSb3V0ZSkuam9pbihcIi9cIik7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkludmFyaWFudDogdW5leHBlY3RlZCBtYXJrZXJcIik7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIGludGVyY2VwdGluZ1JvdXRlLFxuICAgICAgICBpbnRlcmNlcHRlZFJvdXRlXG4gICAgfTtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW50ZXJjZXB0aW9uLXJvdXRlcy5qcy5tYXAiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/next/dist/server/future/helpers/interception-routes.js\n")); /***/ }), /***/ "(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js": /*!*******************************************************************!*\ !*** ./node_modules/@swc/helpers/esm/_interop_require_default.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _: function() { return /* binding */ _interop_require_default; },\n/* harmony export */ _interop_require_default: function() { return /* binding */ _interop_require_default; }\n/* harmony export */ });\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9lc20vX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0LmpzIiwibWFwcGluZ3MiOiI7Ozs7O0FBQU87QUFDUCwyQ0FBMkM7QUFDM0M7QUFDeUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9lc20vX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0LmpzPzhiMWUiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIF9pbnRlcm9wX3JlcXVpcmVfZGVmYXVsdChvYmopIHtcbiAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDogeyBkZWZhdWx0OiBvYmogfTtcbn1cbmV4cG9ydCB7IF9pbnRlcm9wX3JlcXVpcmVfZGVmYXVsdCBhcyBfIH07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/@swc/helpers/esm/_interop_require_default.js\n")); /***/ }), /***/ "(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js": /*!********************************************************************!*\ !*** ./node_modules/@swc/helpers/esm/_interop_require_wildcard.js ***! \********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _: function() { return /* binding */ _interop_require_wildcard; },\n/* harmony export */ _interop_require_wildcard: function() { return /* binding */ _interop_require_wildcard; }\n/* harmony export */ });\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9lc20vX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZC5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ087QUFDUDtBQUNBLHVGQUF1Rjs7QUFFdkY7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQzBDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvZXNtL19pbnRlcm9wX3JlcXVpcmVfd2lsZGNhcmQuanM/ZDE2YiJdLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUobm9kZUludGVyb3ApIHtcbiAgICBpZiAodHlwZW9mIFdlYWtNYXAgIT09IFwiZnVuY3Rpb25cIikgcmV0dXJuIG51bGw7XG5cbiAgICB2YXIgY2FjaGVCYWJlbEludGVyb3AgPSBuZXcgV2Vha01hcCgpO1xuICAgIHZhciBjYWNoZU5vZGVJbnRlcm9wID0gbmV3IFdlYWtNYXAoKTtcblxuICAgIHJ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ICAgICAgICAgICAgaWYgKGRlc2MgJiYgKGRlc2MuZ2V0IHx8IGRlc2Muc2V0KSkgT2JqZWN0LmRlZmluZVByb3BlcnR5KG5ld09iaiwga2V5LCBkZXNjKTtcbiAgICAgICAgICAgIGVsc2UgbmV3T2JqW2tleV0gPSBvYmpba2V5XTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5ld09iai5kZWZhdWx0ID0gb2JqO1xuXG4gICAgaWYgKGNhY2hlKSBjYWNoZS5zZXQob2JqLCBuZXdPYmopO1xuXG4gICAgcmV0dXJuIG5ld09iajtcbn1cbmV4cG9ydCB7IF9pbnRlcm9wX3JlcXVpcmVfd2lsZGNhcmQgYXMgXyB9O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\n")); /***/ }), /***/ "(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js": /*!*************************************************************************!*\ !*** ./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js ***! \*************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _: function() { return /* binding */ _tagged_template_literal_loose; },\n/* harmony export */ _tagged_template_literal_loose: function() { return /* binding */ _tagged_template_literal_loose; }\n/* harmony export */ });\nfunction _tagged_template_literal_loose(strings, raw) {\n if (!raw) raw = strings.slice(0);\n\n strings.raw = raw;\n\n return strings;\n}\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1jbGllbnQpLy4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9lc20vX3RhZ2dlZF90ZW1wbGF0ZV9saXRlcmFsX2xvb3NlLmpzIiwibWFwcGluZ3MiOiI7Ozs7O0FBQU87QUFDUDs7QUFFQTs7QUFFQTtBQUNBO0FBQytDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvZXNtL190YWdnZWRfdGVtcGxhdGVfbGl0ZXJhbF9sb29zZS5qcz8wNTYwIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBfdGFnZ2VkX3RlbXBsYXRlX2xpdGVyYWxfbG9vc2Uoc3RyaW5ncywgcmF3KSB7XG4gICAgaWYgKCFyYXcpIHJhdyA9IHN0cmluZ3Muc2xpY2UoMCk7XG5cbiAgICBzdHJpbmdzLnJhdyA9IHJhdztcblxuICAgIHJldHVybiBzdHJpbmdzO1xufVxuZXhwb3J0IHsgX3RhZ2dlZF90ZW1wbGF0ZV9saXRlcmFsX2xvb3NlIGFzIF8gfTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-client)/./node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js\n")); /***/ }) }, /******/ function(__webpack_require__) { // webpackRuntimeModules /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } /******/ var __webpack_exports__ = (__webpack_exec__("(app-client)/./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js"), __webpack_exec__("(app-client)/./node_modules/next/dist/client/app-next-dev.js")); /******/ _N_E = __webpack_exports__; /******/ } ]);
Evidence 1451617521
Solution Confirmar manualmente que los datos de marca de hora no son sensibles, y que los datos no pueden ser agregados a patrones explotables de divulgación.
-
-
-
Risk=Informativo, Confidence=Media (3)
-
http://localhost:3000 (3)
-
Divulgación de Información - Información sensible en URL (1)
GET http://localhost:3000/register?acceptTermsAndConditions=on&dni=ZAP&email=zaproxy%40example.com&emailMarketing=on&password=ZAP&username=ZAP
Alert tags Alert description La petición aparentaba contener información sensible divulgada en el URL. Esto puede violar el PCI y las políticas de cumplimiento más organizadas. Usted puede configurar la lista de cadenas para que esta comprobación agregue o remueva específicos valores de su entorno.
Other info El URL contiene dirección(es) de correo electrónico.
Request Request line and header section (386 bytes)
GET http://localhost:3000/register?acceptTermsAndConditions=on&dni=ZAP&email=zaproxy%40example.com&emailMarketing=on&password=ZAP&username=ZAP HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache referer: http://localhost:3000/register
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:58:07 GMT connection: close content-length: 13356
Response body (13356 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(auth)/layout.css?v=1701471487176" data-precedence="next_static/css/app/(auth)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik - Autenticación</title><meta name="description" content="Servicio de autenticación de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-navbar-color __className_e66fe9"><main><section class="col-span-4 2xl:col-span-8"><section class="grid grid-cols-4 justify-items-center mx-4 gap-4 2xl:grid-cols-8 2xl:gap-4 2xl:mx-48"><div class="2xl:col-span-2"></div><main class="col-span-4"><div class="py-6 text-center space-y-5"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a><section class="space-y-5"><h1 class="font-bold text-2xl 2xl:text-3xl text-white">Regístrate</h1><h3 class="2xl:text-xl 2xl:font-medium text-white">Crear una nueva cuenta</h3></section><section><form><section class="space-y-5"><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="26" viewBox="0 0 25 26" fill="none" class="self-center"><g clip-path="url(#clip0_232_316)"><path d="M12.5 14.5625C16.3818 14.5625 19.5312 11.4131 19.5312 7.53125C19.5312 3.64941 16.3818 0.5 12.5 0.5C8.61816 0.5 5.46875 3.64941 5.46875 7.53125C5.46875 11.4131 8.61816 14.5625 12.5 14.5625ZM18.75 16.125H16.0596C14.9756 16.623 13.7695 16.9062 12.5 16.9062C11.2305 16.9062 10.0293 16.623 8.94043 16.125H6.25C2.79785 16.125 0 18.9229 0 22.375V23.1562C0 24.4502 1.0498 25.5 2.34375 25.5H22.6562C23.9502 25.5 25 24.4502 25 23.1562V22.375C25 18.9229 22.2021 16.125 18.75 16.125Z" fill="#4C3F92"></path></g><defs><clipPath id="clip0_232_316"><rect width="25" height="25" fill="white" transform="translate(0 0.5)"></rect></clipPath></defs></svg><input type="text" placeholder="Nombre de usuario" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="username"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><input type="text" placeholder="Cédula de identidad" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="dni"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="20" viewBox="0 0 25 20" fill="none" class="self-center"><path d="M24.5264 6.81641C24.7168 6.66504 25 6.80664 25 7.0459V17.0312C25 18.3252 23.9502 19.375 22.6562 19.375H2.34375C1.0498 19.375 0 18.3252 0 17.0312V7.05078C0 6.80664 0.27832 6.66992 0.473633 6.82129C1.56738 7.6709 3.01758 8.75 7.99805 12.3682C9.02832 13.1201 10.7666 14.7021 12.5 14.6924C14.2432 14.707 16.0156 13.0908 17.0068 12.3682C21.9873 8.75 23.4326 7.66602 24.5264 6.81641ZM12.5 13.125C13.6328 13.1445 15.2637 11.6992 16.084 11.1035C22.5635 6.40137 23.0566 5.99121 24.5508 4.81934C24.834 4.59961 25 4.25781 25 3.89648V2.96875C25 1.6748 23.9502 0.625 22.6562 0.625H2.34375C1.0498 0.625 0 1.6748 0 2.96875V3.89648C0 4.25781 0.166016 4.59473 0.449219 4.81934C1.94336 5.98633 2.43652 6.40137 8.91602 11.1035C9.73633 11.6992 11.3672 13.1445 12.5 13.125Z" fill="#4C3F92"></path></svg><input type="email" placeholder="Correo electrónico" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="email"/></div><div class="flex bg-input-bg rounded-lg px-3 py-2 space-x-1 align-middle"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="20" viewBox="0 0 25 20" fill="none" class="self-center"><path d="M8.75 10C9.73891 10 10.7056 9.70676 11.5279 9.15735C12.3501 8.60794 12.991 7.82705 13.3694 6.91342C13.7478 5.99979 13.8469 4.99446 13.6539 4.02455C13.461 3.05465 12.9848 2.16373 12.2855 1.46447C11.5863 0.765206 10.6954 0.289002 9.72545 0.0960758C8.75555 -0.0968503 7.75021 0.00216641 6.83658 0.380605C5.92295 0.759043 5.14206 1.39991 4.59265 2.22215C4.04324 3.0444 3.75 4.0111 3.75 5C3.75 6.32609 4.27678 7.59785 5.21447 8.53554C6.15215 9.47322 7.42392 10 8.75 10ZM12.5 12.5C12.5028 12.0825 12.6117 11.6725 12.8164 11.3086C12.6289 11.2891 12.4453 11.25 12.25 11.25H11.5977C10.7048 11.6618 9.73324 11.875 8.75 11.875C7.76676 11.875 6.79522 11.6618 5.90234 11.25H5.25C3.85771 11.2503 2.52253 11.8035 1.53803 12.788C0.553534 13.7725 0.000310675 15.1077 0 16.5L0 18.125C0 18.6223 0.197544 19.0992 0.549175 19.4508C0.900805 19.8025 1.37772 20 1.875 20H12.8477C12.623 19.6215 12.503 19.1901 12.5 18.75V12.5ZM23.75 11.25H22.5V8.125C22.5 7.2962 22.1708 6.50134 21.5847 5.91529C20.9987 5.32924 20.2038 5 19.375 5C18.5462 5 17.7513 5.32924 17.1653 5.91529C16.5792 6.50134 16.25 7.2962 16.25 8.125V11.25H15C14.6685 11.25 14.3505 11.3817 14.1161 11.6161C13.8817 11.8505 13.75 12.1685 13.75 12.5V18.75C13.75 19.0815 13.8817 19.3995 14.1161 19.6339C14.3505 19.8683 14.6685 20 15 20H23.75C24.0815 20 24.3995 19.8683 24.6339 19.6339C24.8683 19.3995 25 19.0815 25 18.75V12.5C25 12.1685 24.8683 11.8505 24.6339 11.6161C24.3995 11.3817 24.0815 11.25 23.75 11.25ZM19.375 16.875C19.1278 16.875 18.8861 16.8017 18.6805 16.6643C18.475 16.527 18.3148 16.3318 18.2201 16.1034C18.1255 15.8749 18.1008 15.6236 18.149 15.3811C18.1973 15.1387 18.3163 14.9159 18.4911 14.7411C18.6659 14.5663 18.8887 14.4473 19.1311 14.399C19.3736 14.3508 19.6249 14.3755 19.8534 14.4702C20.0818 14.5648 20.277 14.725 20.4143 14.9305C20.5517 15.1361 20.625 15.3778 20.625 15.625C20.625 15.9565 20.4933 16.2745 20.2589 16.5089C20.0245 16.7433 19.7065 16.875 19.375 16.875ZM20.625 11.25H18.125V8.125C18.125 7.79348 18.2567 7.47554 18.4911 7.24112C18.7255 7.0067 19.0435 6.875 19.375 6.875C19.7065 6.875 20.0245 7.0067 20.2589 7.24112C20.4933 7.47554 20.625 7.79348 20.625 8.125V11.25Z" fill="#4C3F92"></path></svg><input type="password" placeholder="Contraseña" class="w-full bg-input-bg text-gray-400 placeholder:text-input-foreground focus:outline-none border-none focus:ring-0" name="password"/></div></section><section class="mt-4 2xl:mt-12 space-y-4 2xl:space-y-5"><div class="space-x-2 text-sm flex justify-start lg:justify-center text-white"><input type="checkbox" class="rounded-full focus:ring-0 checked:text-[#4ECDC4]" name="emailMarketing"/><label>Quiero recibir promociones y noticias de glik</label></div><div class="space-x-2 text-sm flex justify-start lg:justify-center text-white"><input type="checkbox" class="rounded-full focus:ring-0 checked:text-[#4ECDC4]" name="acceptTermsAndConditions"/><label>Acepto los<!-- --> <a class="underline text-secondary-orange" href="/">términos y condiciones</a></label></div></section><button type="submit" class="bg-secondary-orange text-offwhite rounded-full px-14 py-5 font-semibold mt-6 2xl:mt-10">Regístrate</button><p class="pt-7"><a class="font-semibold text-white" href="/login">¿Ya tienes una cuenta? Entra aquí</a></p></form></section></div></main><div class="2xl:col-span-2"></div></section></section></main><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(auth)/layout.css?v=1701471487176\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/components/Logo/horizontalLogo.component.tsx\",\"chunks\":[\"app/(auth)/register/page:static/chunks/app/(auth)/register/page.js\"],\"name\":\"HorizontalLogo\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/Forms/register.component.tsx\",\"c"])</script><script>self.__next_f.push([1,"hunks\":[\"app/(auth)/register/page:static/chunks/app/(auth)/register/page.js\"],\"name\":\"RegisterForm\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/register?acceptTermsAndConditions=on\u0026dni=ZAP\u0026email=zaproxy%40example.com\u0026emailMarketing=on\u0026password=ZAP\u0026username=ZAP\",\"initialTree\":[\"\",{\"children\":[\"(auth)\",{\"children\":[\"register\",{\"children\":[\"__PAGE__?{\\\"acceptTermsAndConditions\\\":\\\"on\\\",\\\"dni\\\":\\\"ZAP\\\",\\\"email\\\":\\\"zaproxy@example.com\\\",\\\"emailMarketing\\\":\\\"on\\\",\\\"password\\\":\\\"ZAP\\\",\\\"username\\\":\\\"ZAP\\\"}\",{}]}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-navbar-color __className_e66fe9\",\"children\":[\"$\",\"main\",null,{\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(auth)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"section\",null,{\"className\":\"grid grid-cols-4 justify-items-center mx-4 gap-4 2xl:grid-cols-8 2xl:gap-4 2xl:mx-48\",\"children\":[[\"$\",\"div\",null,{\"className\":\"2xl:col-span-2\"}],[\"$\",\"main\",null,{\"className\":\"col-span-4\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(auth)\",\"children\",\"register\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"div\",null,{\"className\":\"py-6 text-center space-y-5\",\"children\":[[\"$\",\"$L8\",null,{}],[\"$\",\"section\",null,{\"className\":\"space-y-5\",\"children\":[[\"$\",\"h1\",null,{\"className\":\"font-bold text-2xl 2xl:text-3xl text-white\",\"children\":\"Regístrate\"}],[\"$\",\"h3\",null,{\"className\":\"2xl:text-xl 2xl:font-medium text-white\",\"children\":\"Crear una nueva cuenta\"}]]}],[\"$\",\"section\",null,{\"children\":[\"$\",\"$L9\",null,{}]}]]}],null],\"segment\":\"__PAGE__?{\\\"acceptTermsAndConditions\\\":\\\"on\\\",\\\"dni\\\":\\\"ZAP\\\",\\\"email\\\":\\\"zaproxy@example.com\\\",\\\"emailMarketing\\\":\\\"on\\\",\\\"password\\\":\\\"ZAP\\\",\\\"username\\\":\\\"ZAP\\\"}\"},\"styles\":[]}]}],[\"$\",\"div\",null,{\"className\":\"2xl:col-span-2\"}]]}],null],\"segment\":\"register\"},\"styles\":[]}]}]}]}]}],null],\"segment\":\"(auth)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(auth)/layout.css?v=1701471487176\",\"precedence\":\"next_static/css/app/(auth)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik - Autenticación\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Servicio de autenticación de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Parameter email
Evidence zaproxy@example.com
Solution No pase información sensible en URIs.
-
Modern Web Application (1)
GET http://localhost:3000/robots.txt
Alert tags Alert description The application appears to be a modern web application. If you need to explore it automatically then the Ajax Spider may well be more effective than the standard one.
Other info No links have been found while there are scripts, which is an indication that this is a modern web application.
Request Request line and header section (239 bytes)
GET http://localhost:3000/robots.txt HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (255 bytes)
HTTP/1.1 404 Not Found cache-control: no-store, must-revalidate x-powered-by: Next.js etag: "82a7xtdj8i1on" content-type: text/html; charset=utf-8 content-length: 2183 vary: Accept-Encoding date: Fri, 01 Dec 2023 22:58:05 GMT connection: close
Response body (2183 bytes)
<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills.js?ts=1701471484916"></script><script src="/_next/static/chunks/webpack.js?ts=1701471484916" defer=""></script><script src="/_next/static/chunks/main.js?ts=1701471484916" defer=""></script><script src="/_next/static/chunks/pages/_app.js?ts=1701471484916" defer=""></script><script src="/_next/static/chunks/pages/_error.js?ts=1701471484916" defer=""></script><script src="/_next/static/development/_buildManifest.js?ts=1701471484916" defer=""></script><script src="/_next/static/development/_ssgManifest.js?ts=1701471484916" defer=""></script><noscript id="__next_css__DO_NOT_USE__"></noscript></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1701471484916"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"development","isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
Evidence <script defer="" nomodule="" src="/_next/static/chunks/polyfills.js?ts=1701471484916"></script>
Solution This is an informational alert and so no changes are required.
-
User Agent Fuzzer (1)
GET http://localhost:3000/
Alert tags Alert description Compare las diferencias en la respuesta según el fuzzeo de User Agent (por ejemplo, sitios móviles, acceso como un motor de búsqueda). Compara el código de estado de la respuesta y el hash del cuerpo de la respuesta con la respuesta original.
Request Request line and header section (168 bytes)
GET http://localhost:3000/ HTTP/1.1 host: localhost:3000 user-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1) pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:59:15 GMT connection: close content-length: 56229
Response body (56229 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(dashboard)/layout.css?v=1701471555884" data-precedence="next_static/css/app/(dashboard)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik</title><meta name="description" content="Página de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-offwhite __className_e66fe9"><div><div class="2xl:hidden"><nav class="bg-navbar-color p-5 space-y-5"><div class="grid grid-cols-2"><section class="flex space-x-2 items-center"><figure class="max-w-[80px]"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure></section><section class="flex justify-end pr-2 items-center"><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg></a></section></div><section><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></section></nav></div><div class="hidden 2xl:block"><nav class="bg-navbar-color"><div class="grid grid-cols-4 2xl:grid-cols-5 justify-items-stretch gap-4 2xl:gap-4 border-b border-b-gray-border 2xl:px-6 px-4 py-4 2xl:items-center"><figure class="flex col-span-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="2xl:hidden"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#1C1C1C"></path></svg><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure><div class="col-span-1"></div><div class="col-span-2 flex items-center "><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></div><div class="col-span-1"><ul class="flex justify-end text-center align-middle text-white text-sm"><li><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg><p>Iniciar Sesión</p></a></li></ul></div></div></nav></div></div><main class="grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48"><section class="col-span-4 2xl:col-span-8"><main class="space-y-7"><div class="fixed bottom-5 right-5"> <div class="fixed bottom-5 right-5 md:right-5 z-50 space-y-4 md:space-y-0 md:flex md:flex-col p-2"><a target="_blank" rel="noopener noreferrer" href="https://www.instagram.com/glik.ve/"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="#000000"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://www.tiktok.com/@glik7"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></a></div></div><figure><img alt="Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS" loading="lazy" width="1920" height="1080" decoding="async" data-nimg="1" class="mx-auto mt-5" style="color:transparent" src="/_next/static/media/glik_banner.126325ef.webp"/></figure><h3 class="text-lg font-bold 2xl:text-3xl text-center 2xl:text-left">Modelos disponibles</h3><div class="space-y-3 2xl:space-y-0 2xl:grid 2xl:grid-cols-8 2xl:gap-4 2xl:justify-items-stretch pb-8"></div></main></section></main><div class="mx-auto max-md:hidden mt-2"><footer class="bg-navbar-color py-1 text-black lg:px-48"><div class="flex align-middle mt-4"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras blancas y foto de un conejo" loading="lazy" width="201" height="70" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></div><hr class="my-8 h-0.5 border-t-0 bg-neutral-100 opacity-50 dark:opacity-50"/><div class="px-4 max-w-full mt-8 md:grid md:grid-cols-4 gap-4 2xl:grid 2xl:grid-cols-4 justify-items-center align-middle"> <div class="col-span-1"><p class="my-2 text-white font-bold">$ USD</p><p class="my-2 text-white">Copyright Glik.ve</p><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M24.9292 8.68964C25.0796 10.0467 24.5379 11.3839 23.7462 12.3668C22.9201 13.3345 21.5985 14.0746 20.3113 13.9793C20.1428 12.6735 20.795 11.285 21.5251 10.4379C22.3503 9.47652 23.7834 8.74 24.9292 8.68964Z" fill="white"></path><path d="M29.1431 16.5179C28.9994 16.603 26.6188 18.0136 26.6449 20.8903C26.6757 24.3643 29.7066 25.5127 29.7429 25.5244C29.7248 25.6053 29.2682 27.1836 28.1314 28.7825C27.1821 30.1926 26.1875 31.5712 24.6077 31.5946C23.8564 31.6122 23.3491 31.3979 22.8205 31.1745C22.2694 30.9416 21.6951 30.6989 20.7968 30.6989C19.8445 30.6989 19.2447 30.9496 18.6663 31.1914C18.1659 31.4005 17.6814 31.603 16.9986 31.6306C15.494 31.6854 14.3445 30.1269 13.3607 28.7294C11.3942 25.8778 9.8633 20.6934 11.9159 17.1655C12.9105 15.4352 14.724 14.321 16.6625 14.2913C17.5162 14.274 18.3349 14.6006 19.0526 14.8869C19.6015 15.1058 20.0913 15.3012 20.4924 15.3012C20.8448 15.3012 21.3208 15.1137 21.8757 14.895C22.7501 14.5505 23.8201 14.1289 24.9102 14.2428C25.6557 14.2643 27.7772 14.535 29.1459 16.5162L29.1431 16.5179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M40.0404 9.46415H37.9139V15.7451H40.0404C41.9213 15.7451 43.0261 14.5829 43.0261 12.6025C43.0261 10.6263 41.9169 9.46415 40.0404 9.46415ZM38.7031 10.1693V15.04H39.9877C41.4215 15.04 42.2194 14.1694 42.2194 12.6112C42.2194 11.0398 41.4258 10.1693 39.9877 10.1693H38.7031Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M46.0745 15.8235C44.8118 15.8235 43.9612 14.9225 43.9612 13.4817C43.9612 12.0366 44.8118 11.1399 46.0745 11.1399C47.3328 11.1399 48.1834 12.0366 48.1834 13.4817C48.1834 14.9225 47.3328 15.8235 46.0745 15.8235ZM47.4074 13.4817C47.4074 14.5481 46.8812 15.1575 46.0745 15.1575C45.2678 15.1575 44.7372 14.5481 44.7372 13.4817C44.7372 12.4153 45.2678 11.8059 46.0745 11.8059C46.8812 11.8059 47.4074 12.4153 47.4074 13.4817Z" fill="white"></path><path d="M53.003 15.7451H53.7791L55.0506 11.2183H54.2964L53.3845 14.9007H53.367L52.3322 11.2183H51.5956L50.5653 14.9007H50.5478L49.6358 11.2183H48.8773L50.1532 15.7451H50.9292L51.9552 12.2412H51.9727L53.003 15.7451Z" fill="white"></path><path d="M56.6915 11.2183H55.9725V15.7451H56.7354V13.0813C56.7354 12.3152 57.2045 11.8103 57.9235 11.8103C58.625 11.8103 58.9714 12.2107 58.9714 12.942V15.7451H59.7343V12.807C59.7343 11.7798 59.1556 11.1399 58.1559 11.1399C57.45 11.1399 56.9633 11.4533 56.7091 11.9408H56.6915V11.2183Z" fill="white"></path><path d="M61.042 9.46415V15.7451H61.8049V9.46415H61.042Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.911 13.4817C62.911 14.9225 63.7615 15.8235 65.0243 15.8235C66.2826 15.8235 67.1332 14.9225 67.1332 13.4817C67.1332 12.0366 66.2826 11.1399 65.0243 11.1399C63.7615 11.1399 62.911 12.0366 62.911 13.4817ZM65.0242 15.1575C65.831 15.1575 66.3571 14.5481 66.3571 13.4817C66.3571 12.4153 65.831 11.8059 65.0242 11.8059C64.2175 11.8059 63.687 12.4153 63.687 13.4817C63.687 14.5481 64.2175 15.1575 65.0242 15.1575Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.5326 15.8235C68.625 15.8235 68.0156 15.2794 68.0156 14.4654C68.0156 13.6906 68.6163 13.2031 69.6685 13.1422L70.9751 13.0682V12.6895C70.9751 12.1367 70.6068 11.8059 69.9754 11.8059C69.3879 11.8059 69.0196 12.0801 68.9232 12.5241H68.1866C68.2392 11.7406 68.9144 11.1399 69.993 11.1399C71.0628 11.1399 71.738 11.7145 71.738 12.6155V15.7451H71.0145V14.966H70.997C70.7252 15.484 70.1464 15.8235 69.5326 15.8235ZM70.9751 14.0258C70.9751 14.6787 70.4226 15.1793 69.7036 15.1793C69.1555 15.1793 68.7916 14.8963 68.7916 14.4654C68.7916 14.0389 69.1424 13.769 69.7562 13.7298L70.9751 13.6558V14.0258Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M72.7826 13.4817C72.7826 14.9007 73.5718 15.8235 74.7337 15.8235C75.3914 15.8235 75.9131 15.5014 76.2069 14.979H76.22V15.7451H76.9478V9.46415H76.1849V11.9539H76.1674C75.8956 11.4577 75.3694 11.1399 74.7162 11.1399C73.5674 11.1399 72.7826 12.0627 72.7826 13.4817ZM74.8784 11.8059C74.0717 11.8059 73.5631 12.4588 73.5631 13.4817C73.5631 14.509 74.0717 15.1575 74.8784 15.1575C75.6632 15.1575 76.1893 14.4959 76.1893 13.4817C76.1893 12.4719 75.6632 11.8059 74.8784 11.8059Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M82.3079 15.8235C81.0452 15.8235 80.1946 14.9225 80.1946 13.4817C80.1946 12.0366 81.0452 11.1399 82.3079 11.1399C83.5663 11.1399 84.4168 12.0366 84.4168 13.4817C84.4168 14.9225 83.5663 15.8235 82.3079 15.8235ZM83.6408 13.4817C83.6408 14.5481 83.1147 15.1575 82.3079 15.1575C81.5012 15.1575 80.9707 14.5481 80.9707 13.4817C80.9707 12.4153 81.5012 11.8059 82.3079 11.8059C83.1147 11.8059 83.6408 12.4153 83.6408 13.4817Z" fill="white"></path><path d="M86.2025 11.2183H85.4834V15.7451H86.2463V13.0813C86.2463 12.3152 86.7154 11.8103 87.4345 11.8103C88.136 11.8103 88.4824 12.2107 88.4824 12.942V15.7451H89.2453V12.807C89.2453 11.7798 88.6665 11.1399 87.6669 11.1399C86.961 11.1399 86.4743 11.4533 86.22 11.9408H86.2025V11.2183Z" fill="white"></path><path d="M93.6627 10.1258H92.8998V11.2183H92.2202V11.8407H92.8998V14.5699C92.8998 15.4404 93.2243 15.7799 94.0617 15.7799C94.2414 15.7799 94.4519 15.7669 94.544 15.7451V15.1096C94.4914 15.1183 94.316 15.1314 94.2283 15.1314C93.8381 15.1314 93.6627 14.9442 93.6627 14.5307V11.8407H94.5484V11.2183H93.6627V10.1258Z" fill="white"></path><path d="M95.6982 9.46415V15.7451H96.4611V13.1074C96.4611 12.3239 96.9303 11.8103 97.6888 11.8103C98.4034 11.8103 98.7673 12.2412 98.7673 12.9594V15.7451H99.5302V12.8201C99.5302 11.8103 98.9252 11.1399 97.9255 11.1399C97.2328 11.1399 96.733 11.4359 96.4787 11.9408H96.4611V9.46415H95.6982Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M104.573 14.448H103.824C103.697 14.8746 103.271 15.1662 102.693 15.1662C101.873 15.1662 101.36 14.596 101.36 13.7298V13.6863H104.63V13.399C104.63 12.0279 103.872 11.1399 102.64 11.1399C101.382 11.1399 100.575 12.0932 100.575 13.4991C100.575 14.9225 101.368 15.8235 102.675 15.8235C103.67 15.8235 104.442 15.2402 104.573 14.448ZM102.627 11.7972C101.912 11.7972 101.412 12.3413 101.364 13.0943H103.841C103.824 12.3369 103.346 11.7972 102.627 11.7972Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M45.3018 31.1427L44.197 27.9019H39.5933L38.4884 31.1427H36.5382L40.8991 19.1517H42.9247L47.2856 31.1427H45.3018ZM40.0704 26.4061L41.87 21.1461H41.9202L43.7198 26.4061H40.0704Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.1019 26.7718C57.1019 24.0046 55.6287 22.2596 53.3939 22.2596C52.1216 22.2596 51.1088 22.8994 50.5898 23.9049H50.5564V22.4008H48.807V34.0345H50.6149V29.7051H50.6568C51.159 30.6773 52.1634 31.2922 53.4274 31.2922C55.6371 31.2922 57.1019 29.5389 57.1019 26.7718ZM52.9168 29.7716C54.3481 29.7716 55.2437 28.6082 55.2437 26.7718C55.2437 24.9436 54.3481 23.7719 52.9168 23.7719C51.5357 23.7719 50.6066 24.9685 50.6066 26.7718C50.6066 28.5916 51.5273 29.7716 52.9168 29.7716Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.4864 22.2596C65.7213 22.2596 67.1944 24.0046 67.1944 26.7718C67.1944 29.5389 65.7296 31.2922 63.5199 31.2922C62.256 31.2922 61.2515 30.6773 60.7493 29.7051H60.7075V34.0345H58.8995V22.4008H60.6489V23.9049H60.6824C61.2013 22.8994 62.2141 22.2596 63.4864 22.2596ZM65.3362 26.7718C65.3362 28.6082 64.4406 29.7716 63.0093 29.7716C61.6198 29.7716 60.6991 28.5916 60.6991 26.7718C60.6991 24.9685 61.6282 23.7719 63.0093 23.7719C64.4406 23.7719 65.3362 24.9436 65.3362 26.7718Z" fill="white"></path><path d="M74.4056 27.8022H72.5558C72.673 29.971 74.4809 31.3421 77.1594 31.3421C80.0221 31.3421 81.8217 29.9378 81.8217 27.6941C81.8217 25.9408 80.7921 24.9519 78.3145 24.3702L76.9837 24.0462C75.4268 23.6639 74.7906 23.1653 74.7906 22.3177C74.7906 21.2541 75.7867 20.5228 77.2431 20.5228C78.6996 20.5228 79.6956 21.2458 79.8044 22.4424H81.6291C81.5705 20.3733 79.8212 18.9523 77.2682 18.9523C74.6902 18.9523 72.8739 20.3733 72.8739 22.4424C72.8739 24.1126 73.9034 25.143 76.1215 25.6749L77.6868 26.0488C79.252 26.4311 79.9132 26.9878 79.9132 27.9185C79.9132 28.9905 78.8167 29.7716 77.2934 29.7716C75.703 29.7716 74.5395 28.9905 74.4056 27.8022Z" fill="white"></path><path d="M86.0383 20.3317H84.2219V22.4008H82.9413V23.8218H84.2219V28.8409C84.2219 30.5278 84.9167 31.2008 86.6995 31.2008C87.1013 31.2008 87.5031 31.1676 87.704 31.1177V29.6968C87.5868 29.7217 87.2938 29.7383 87.1097 29.7383C86.3731 29.7383 86.0383 29.3976 86.0383 28.6414V23.8218H87.7123V22.4008H86.0383V20.3317Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M88.9994 26.7718C88.9994 29.5888 90.6567 31.3089 93.1761 31.3089C95.6956 31.3089 97.3529 29.5888 97.3529 26.7718C97.3529 23.9631 95.6872 22.2429 93.1761 22.2429C90.665 22.2429 88.9994 23.9631 88.9994 26.7718ZM93.1761 29.8297C94.5991 29.8297 95.5114 28.7162 95.5114 26.7718C95.5114 24.8356 94.5907 23.7221 93.1761 23.7221C91.7615 23.7221 90.8408 24.8356 90.8408 26.7718C90.8408 28.7162 91.7615 29.8297 93.1761 29.8297Z" fill="white"></path><path d="M99.1589 22.4008H100.883V23.8883H100.925C101.218 22.8662 102.005 22.2596 103.043 22.2596C103.302 22.2596 103.528 22.3011 103.662 22.326V23.9963C103.52 23.9381 103.202 23.8966 102.85 23.8966C101.687 23.8966 100.967 24.6694 100.967 25.9075V31.1427H99.1589V22.4008Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M111.026 28.5812H112.742C112.491 30.1766 110.967 31.3151 108.95 31.3151C106.364 31.3151 104.798 29.5783 104.798 26.8195C104.798 24.0773 106.389 22.2492 108.875 22.2492C111.319 22.2492 112.842 23.961 112.842 26.6118V27.2267H106.623V27.3347C106.623 28.8554 107.544 29.8609 108.992 29.8609C110.021 29.8609 110.783 29.3457 111.026 28.5812ZM106.623 26.0752L111.026 26.0338C111.026 25.6655 110.871 24.9827 110.506 24.6207C110.141 24.2586 109.604 23.9837 108.875 23.9837C107.406 23.9837 106.623 24.9579 106.623 26.0752Z" fill="white"></path></svg></div><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M38.1173 11.1907H35.5787V11.9386H37.3793C37.2902 12.9874 36.4113 13.4347 35.5818 13.4347C34.5204 13.4347 33.5941 12.6056 33.5941 11.4435C33.5941 10.3115 34.477 9.4397 35.584 9.4397C36.4382 9.4397 36.9415 9.98015 36.9415 9.98015L37.4689 9.43788C37.4689 9.43788 36.7919 8.68964 35.5571 8.68964C33.9847 8.68964 32.7684 10.0071 32.7684 11.4301C32.7684 12.8246 33.9126 14.1841 35.5971 14.1841C37.0788 14.1841 38.1634 13.1766 38.1634 11.6866C38.1634 11.3723 38.1173 11.1907 38.1173 11.1907Z" fill="white"></path><path d="M38.5956 23.2445H44.1741C44.178 23.2602 44.275 23.6573 44.275 24.334C44.275 27.6082 41.8918 29.8224 38.6362 29.8224C34.9344 29.8224 32.4202 26.8347 32.4202 23.7706C32.4202 20.6437 35.0931 17.7486 38.5481 17.7487C41.2614 17.7487 42.7492 19.3929 42.7492 19.3929L41.59 20.5845C41.59 20.5845 40.4842 19.3967 38.6073 19.3967C36.1749 19.3967 34.2348 21.3124 34.2348 23.7999C34.2348 26.3533 36.27 28.1752 38.6023 28.1752C40.4252 28.1752 42.3565 27.1923 42.552 24.8879H38.5956V23.2445Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.9867 25.903C44.9867 23.8309 46.6271 22.0543 48.9162 22.0543C50.7978 22.0543 52.8382 23.378 52.8382 25.9482C52.8382 28.1906 51.0841 29.8153 48.9429 29.8153C46.5777 29.8153 44.9867 28.0057 44.9867 25.903ZM51.1313 25.9379C51.1313 24.482 50.0646 23.5785 48.9389 23.5785C47.6741 23.5785 46.702 24.5824 46.702 25.9266C46.702 27.3003 47.6862 28.2921 48.9337 28.2921C50.069 28.2921 51.1313 27.3628 51.1313 25.9379Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.555 22.0543C55.266 22.0543 53.6255 23.8309 53.6255 25.903C53.6255 28.0057 55.2166 29.8153 57.582 29.8153C59.723 29.8153 61.4772 28.1906 61.4772 25.9482C61.4772 23.378 59.4368 22.0543 57.555 22.0543ZM57.5778 23.5785C58.7034 23.5785 59.7702 24.482 59.7702 25.9379C59.7702 27.3628 58.7079 28.2921 57.5725 28.2921C56.3251 28.2921 55.341 27.3003 55.341 25.9266C55.341 24.5824 56.3129 23.5785 57.5778 23.5785Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.2641 25.9357C62.2641 23.8853 63.9158 22.0584 66.0167 22.0584C66.9315 22.0584 67.6205 22.4099 68.1244 22.949V22.2917H69.7632V29.2646C69.7632 32.0043 68.1711 33.3103 66.082 33.3103C64.1722 33.3103 63.0994 32.1446 62.5663 31.0252L64.0686 30.4018C64.2767 30.9018 64.8756 31.7836 66.0695 31.7836C67.3055 31.7836 68.1243 30.9815 68.1243 29.6427V28.8775C67.687 29.3813 67.0947 29.8205 65.9805 29.8205C64.1788 29.8205 62.2641 28.2715 62.2641 25.9357ZM66.1688 23.5796C67.199 23.5796 68.2568 24.4528 68.2568 25.944C68.2568 27.4598 67.2012 28.2951 66.1461 28.2951C65.0261 28.2951 63.9838 27.3922 63.9838 25.9584C63.9838 24.4686 65.0663 23.5796 66.1688 23.5796Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M73.7486 25.9245C73.7486 23.6146 75.4125 22.0491 77.3944 22.0491C78.9576 22.0491 80.1387 23.0841 80.645 24.3232L80.9172 24.9559L75.6759 27.1149C75.989 27.6935 76.4943 28.2909 77.593 28.291C78.5713 28.291 79.1575 27.763 79.5082 27.2227L80.8593 28.1153C80.2535 28.9201 79.2386 29.8183 77.5848 29.8183C75.6033 29.8183 73.7486 28.3687 73.7486 25.9245ZM77.4628 23.5416C78.177 23.5416 78.6909 23.9184 78.9092 24.3705L75.409 25.8228C75.2581 24.6984 76.3313 23.5416 77.4628 23.5416Z" fill="white"></path><path d="M72.7991 29.5879H71.0775V18.1501H72.7991V29.5879Z" fill="white"></path><path d="M94.1596 29.5879H95.8812V18.1501H94.1596V29.5879Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.7517 29.5879H85.0301V18.1501L89.1945 18.1499C91.2132 18.1499 92.8648 19.7896 92.8648 21.7937C92.8648 23.7977 91.2132 25.4373 89.1945 25.4373H86.7517V29.5879ZM86.7516 23.7282V19.8591H89.1945C90.263 19.8591 91.1433 20.7329 91.1433 21.7937C91.1433 22.8544 90.263 23.7282 89.1945 23.7282H86.7516Z" fill="white"></path><path d="M108.592 33.3103L113.577 22.0493H111.696L109.441 27.1452L107.185 22.0493H105.305L108.5 29.2692L106.712 33.3103H108.592Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.927 29.5879H104.649V25.4742C104.918 21.2314 99.4999 20.2336 97.4497 23.2921L98.8351 24.215C99.8375 22.4751 102.698 22.8755 102.886 24.7401C102.026 24.514 101.098 24.3501 100.249 24.4353C98.9247 24.5684 97.7907 25.4034 97.6105 26.7712C97.5131 27.5103 97.6793 28.4213 98.199 28.9765C99.0089 29.8415 100.339 29.9581 101.431 29.6625C102.046 29.4961 102.53 29.1333 102.927 28.6647V29.5879ZM101.022 28.1717C101.964 27.9169 102.707 27.2327 102.927 26.2816C102.445 26.1267 102.002 26.0017 101.494 25.9408C98.5359 25.4993 99.0312 28.7104 101.022 28.1717Z" fill="white"></path><path d="M49.2771 14.0775H48.4937V8.87231H49.2771V14.0775Z" fill="white"></path><path d="M44.1061 14.0775H44.8896V9.65006H46.1757V8.87231H42.82V9.65006H44.1061V14.0775Z" fill="white"></path><path d="M41.994 14.0775H38.9893V8.87231H41.994V9.65006H39.7729V11.0861H41.7266V11.8638H39.7729V13.2997H41.994V14.0775Z" fill="white"></path><path d="M51.9844 14.0775V9.65006H53.2705V8.87231H49.915V9.65006H51.201V14.0775H51.9844Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M55.2864 11.4301C55.2864 10.007 56.5028 8.68964 58.0751 8.68964C59.6475 8.68964 60.8639 10.007 60.8639 11.4301C60.8639 12.8134 59.7378 14.1623 58.0751 14.1836C56.4125 14.1623 55.2864 12.8134 55.2864 11.4301ZM58.0751 13.4343C57.0241 13.4215 56.1122 12.5966 56.1122 11.4435C56.1122 10.3207 56.9808 9.45397 58.0751 9.43995C59.1695 9.45397 60.0381 10.3207 60.0381 11.4435C60.0381 12.5966 59.1262 13.4215 58.0751 13.4343Z" fill="white"></path><path d="M62.43 14.0775H61.6464V8.87231H62.43L64.9449 12.6619V8.87231H65.7285V14.0775H64.9463L62.43 10.286V14.0775Z" fill="white"></path><path d="M11.3758 15.1822L20.2279 23.9572L11.4183 32.8091C11.1612 32.647 11.0234 32.2958 11.021 31.8421L10.9412 16.1313C10.9387 15.6345 11.1208 15.3315 11.3758 15.1822Z" fill="white"></path><path d="M12.3827 15.1941L23.147 21.0242L20.5941 23.5892L12.0071 15.0769C12.1372 15.0938 12.2678 15.1317 12.3827 15.1941Z" fill="white"></path><path d="M23.6257 26.5943L20.9628 23.9546L23.623 21.282L27.2863 23.2659C28.1887 23.7544 27.7271 24.3656 27.2863 24.6051L23.6257 26.5943Z" fill="white"></path><path d="M12.3827 32.7031C12.3014 32.7482 12.223 32.7835 12.148 32.8116L20.5967 24.3227L23.1492 26.853L12.3827 32.7031Z" fill="white"></path></svg></div></div><div class="col-span-1"><div class="my-2 text-secondary-orange font-semibold">Contactanos</div><a href="https://www.google.com/maps/place/GLIK+7/@10.4940965,-66.8547532,17z/data=!3m1!4b1!4m6!3m5!1s0x8c2af70856c1a779:0x77aa75f245771c40!8m2!3d10.4940965!4d-66.8547532!16s%2Fg%2F11svrs7m27?entry=ttu"><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"></path><path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg></span>Casa 1722 C. Sucre, Caracas 1060, Miranda.</p></a><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"></path></svg></span> ventas@glik7.com</p><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"></path></svg></span>04128229919</p></div><div class="col-span-1"><div class="my-2 ml-2 text-secondary-orange font-semibold">Extra</div><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Nosotros</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Cómo funciona</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Terminos y condiciones</p></div><div class="col-span-1 mt-4"><div class="space-y-3"><a href="https://www.instagram.com/glik.ve/"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="white"></path></g></svg></div></a><a href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></div></a><a href="https://www.tiktok.com/@glik7"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></div></a></div></div></div></footer></div><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(dashboard)/layout.css?v=1701471555884\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/config/Providers.config.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"Providers\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/navbar.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:st"])</script><script>self.__next_f.push([1,"atic/chunks/app/(dashboard)/layout.js\"],\"name\":\"Navbar\",\"async\":false}\na:I{\"id\":\"(app-client)/./src/socialNetworksButton.component.tsx\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"\",\"async\":false}\nb:I{\"id\":\"(app-client)/./node_modules/next/dist/client/image-component.js\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"Image\",\"async\":false}\nc:I{\"id\":\"(app-client)/./src/components/Product/productsList.component.tsx\",\"chunks\":[\"app/(dashboard)"])</script><script>self.__next_f.push([1,"/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"ProductsList\",\"async\":false}\nd:I{\"id\":\"(app-client)/./src/components/Footer/footer.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"(dashboard)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-offwhite __className_e66fe9\",\"children\":[\"$\",\"$L8\",null,{\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"className\":\"grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48\",\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(dashboard)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"main\",null,{\"className\":\"space-y-7\",\"children\":[[\"$\",\"div\",null,{\"className\":\"fixed bottom-5 right-5\",\"children\":[\" \",[\"$\",\"$La\",null,{}]]}],[\"$\",\"figure\",null,{\"children\":[\"$\",\"$Lb\",null,{\"src\":{\"src\":\"/_next/static/media/glik_banner.126325ef.webp\",\"height\":509,\"width\":1532,\"blurDataURL\":\"/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fglik_banner.126325ef.webp\u0026w=8\u0026q=70\",\"blurWidth\":8,\"blurHeight\":3},\"alt\":\"Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS\",\"width\":1920,\"height\":1080,\"className\":\"mx-auto mt-5\"}]}],[\"$\",\"h3\",null,{\"className\":\"text-lg font-bold 2xl:text-3xl text-center 2xl:text-left\",\"children\":\"Modelos disponibles\"}],[\"$\",\"$Lc\",null,{}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}]}],[\"$\",\"$Ld\",null,{}]]}]}]}],null],\"segment\":\"(dashboard)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(dashboard)/layout.css?v=1701471555884\",\"precedence\":\"next_static/css/app/(dashboard)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Página de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Parameter Header User-Agent
Attack Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)
-
-
-
Risk=Informativo, Confidence=Baja (1)
-
http://localhost:3000 (1)
-
Divulgación de información - Comentarios sospechosos (1)
GET http://localhost:3000/
Alert tags Alert description La respuesta parece contener comentarios sospechosos que pueden ayudar a un atacante. Nota: Las coincidencias realizadas dentro de los scripts o archivos se refieren a todo el contenido, no solo a los comentarios.
Other info The following pattern was used: \bFROM\b and was detected in the element starting with: "<script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/", see evidence field for the suspicious comment/snippet.
Request Request line and header section (229 bytes)
GET http://localhost:3000/ HTTP/1.1 host: localhost:3000 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 pragma: no-cache cache-control: no-cache
Request body (0 bytes)
Response Status line and header section (277 bytes)
HTTP/1.1 200 OK vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding cache-control: no-store, must-revalidate x-powered-by: Next.js content-type: text/html; charset=utf-8 date: Fri, 01 Dec 2023 22:57:51 GMT connection: close content-length: 56229
Response body (56229 bytes)
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="/_next/static/css/app/(dashboard)/layout.css?v=1701471471735" data-precedence="next_static/css/app/(dashboard)/layout.css"/><link rel="preload" href="/_next/static/chunks/webpack.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app.js" as="script"/><title>Glik</title><meta name="description" content="Página de la plataforma de arrendamientos: Glik"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/><script src="/_next/static/chunks/polyfills.js" noModule=""></script></head><body class="bg-offwhite __className_e66fe9"><div><div class="2xl:hidden"><nav class="bg-navbar-color p-5 space-y-5"><div class="grid grid-cols-2"><section class="flex space-x-2 items-center"><figure class="max-w-[80px]"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure></section><section class="flex justify-end pr-2 items-center"><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg></a></section></div><section><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></section></nav></div><div class="hidden 2xl:block"><nav class="bg-navbar-color"><div class="grid grid-cols-4 2xl:grid-cols-5 justify-items-stretch gap-4 2xl:gap-4 border-b border-b-gray-border 2xl:px-6 px-4 py-4 2xl:items-center"><figure class="flex col-span-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="2xl:hidden"><path d="M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z" fill="#1C1C1C"></path></svg><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras moradas" loading="lazy" width="539" height="188" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></figure><div class="col-span-1"></div><div class="col-span-2 flex items-center "><div class="flex"><input placeholder="Buscar" class="placeholder:text-gray-400 text-gray-400 border border-white rounded-l-lg rounded-bl-lg 2xl:px-4 2xl:py-2 w-full focus:ring-0 focus:outline-none" name="searchInput"/><div class="p-2 rounded-r-lg rounded-br-lg bg-white text-offwhite"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M23.6696 20.7495L18.9966 16.0766C18.7857 15.8656 18.4998 15.7485 18.1998 15.7485H17.4358C18.7294 14.0939 19.4981 12.0129 19.4981 9.74905C19.4981 4.36364 15.1345 0 9.74905 0C4.36364 0 0 4.36364 0 9.74905C0 15.1345 4.36364 19.4981 9.74905 19.4981C12.0129 19.4981 14.0939 18.7294 15.7485 17.4358V18.1998C15.7485 18.4998 15.8656 18.7857 16.0766 18.9966L20.7495 23.6696C21.1901 24.1101 21.9025 24.1101 22.3384 23.6696L23.6649 22.3431C24.1055 21.9025 24.1055 21.1901 23.6696 20.7495ZM9.74905 15.7485C6.43531 15.7485 3.74963 13.0675 3.74963 9.74905C3.74963 6.43531 6.43062 3.74963 9.74905 3.74963C13.0628 3.74963 15.7485 6.43062 15.7485 9.74905C15.7485 13.0628 13.0675 15.7485 9.74905 15.7485Z" fill="#602CBA"></path></svg></div></div></div><div class="col-span-1"><ul class="flex justify-end text-center align-middle text-white text-sm"><li><a class="space-y-1 flex flex-col justify-center items-center hover:cursor-pointer text-end" href="/login"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none" class="w-5"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 10C12.7625 10 15 7.7625 15 5C15 2.2375 12.7625 0 10 0C7.2375 0 5 2.2375 5 5C5 7.7625 7.2375 10 10 10ZM10 11.5C6.6625 11.5 0 13.175 0 16.5V17.75C0 18.4375 0.5625 19 1.25 19H18.75C19.4375 19 20 18.4375 20 17.75V16.5C20 13.175 13.3375 11.5 10 11.5Z" fill="white"></path></svg><p>Iniciar Sesión</p></a></li></ul></div></div></nav></div></div><main class="grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48"><section class="col-span-4 2xl:col-span-8"><main class="space-y-7"><div class="fixed bottom-5 right-5"> <div class="fixed bottom-5 right-5 md:right-5 z-50 space-y-4 md:space-y-0 md:flex md:flex-col p-2"><a target="_blank" rel="noopener noreferrer" href="https://www.instagram.com/glik.ve/"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="#000000"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></a><a target="_blank" rel="noopener noreferrer" href="https://www.tiktok.com/@glik7"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></a></div></div><figure><img alt="Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS" loading="lazy" width="1920" height="1080" decoding="async" data-nimg="1" class="mx-auto mt-5" style="color:transparent" src="/_next/static/media/glik_banner.126325ef.webp"/></figure><h3 class="text-lg font-bold 2xl:text-3xl text-center 2xl:text-left">Modelos disponibles</h3><div class="space-y-3 2xl:space-y-0 2xl:grid 2xl:grid-cols-8 2xl:gap-4 2xl:justify-items-stretch pb-8"></div></main></section></main><div class="mx-auto max-md:hidden mt-2"><footer class="bg-navbar-color py-1 text-black lg:px-48"><div class="flex align-middle mt-4"><a href="/"><section class="flex"><figure><img alt="Texto del logo de Glik con letras blancas y foto de un conejo" loading="lazy" width="201" height="70" decoding="async" data-nimg="1" style="color:transparent" src="/_next/static/media/footerLogoWhite.bfc35816.webp"/></figure></section></a></div><hr class="my-8 h-0.5 border-t-0 bg-neutral-100 opacity-50 dark:opacity-50"/><div class="px-4 max-w-full mt-8 md:grid md:grid-cols-4 gap-4 2xl:grid 2xl:grid-cols-4 justify-items-center align-middle"> <div class="col-span-1"><p class="my-2 text-white font-bold">$ USD</p><p class="my-2 text-white">Copyright Glik.ve</p><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M24.9292 8.68964C25.0796 10.0467 24.5379 11.3839 23.7462 12.3668C22.9201 13.3345 21.5985 14.0746 20.3113 13.9793C20.1428 12.6735 20.795 11.285 21.5251 10.4379C22.3503 9.47652 23.7834 8.74 24.9292 8.68964Z" fill="white"></path><path d="M29.1431 16.5179C28.9994 16.603 26.6188 18.0136 26.6449 20.8903C26.6757 24.3643 29.7066 25.5127 29.7429 25.5244C29.7248 25.6053 29.2682 27.1836 28.1314 28.7825C27.1821 30.1926 26.1875 31.5712 24.6077 31.5946C23.8564 31.6122 23.3491 31.3979 22.8205 31.1745C22.2694 30.9416 21.6951 30.6989 20.7968 30.6989C19.8445 30.6989 19.2447 30.9496 18.6663 31.1914C18.1659 31.4005 17.6814 31.603 16.9986 31.6306C15.494 31.6854 14.3445 30.1269 13.3607 28.7294C11.3942 25.8778 9.8633 20.6934 11.9159 17.1655C12.9105 15.4352 14.724 14.321 16.6625 14.2913C17.5162 14.274 18.3349 14.6006 19.0526 14.8869C19.6015 15.1058 20.0913 15.3012 20.4924 15.3012C20.8448 15.3012 21.3208 15.1137 21.8757 14.895C22.7501 14.5505 23.8201 14.1289 24.9102 14.2428C25.6557 14.2643 27.7772 14.535 29.1459 16.5162L29.1431 16.5179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M40.0404 9.46415H37.9139V15.7451H40.0404C41.9213 15.7451 43.0261 14.5829 43.0261 12.6025C43.0261 10.6263 41.9169 9.46415 40.0404 9.46415ZM38.7031 10.1693V15.04H39.9877C41.4215 15.04 42.2194 14.1694 42.2194 12.6112C42.2194 11.0398 41.4258 10.1693 39.9877 10.1693H38.7031Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M46.0745 15.8235C44.8118 15.8235 43.9612 14.9225 43.9612 13.4817C43.9612 12.0366 44.8118 11.1399 46.0745 11.1399C47.3328 11.1399 48.1834 12.0366 48.1834 13.4817C48.1834 14.9225 47.3328 15.8235 46.0745 15.8235ZM47.4074 13.4817C47.4074 14.5481 46.8812 15.1575 46.0745 15.1575C45.2678 15.1575 44.7372 14.5481 44.7372 13.4817C44.7372 12.4153 45.2678 11.8059 46.0745 11.8059C46.8812 11.8059 47.4074 12.4153 47.4074 13.4817Z" fill="white"></path><path d="M53.003 15.7451H53.7791L55.0506 11.2183H54.2964L53.3845 14.9007H53.367L52.3322 11.2183H51.5956L50.5653 14.9007H50.5478L49.6358 11.2183H48.8773L50.1532 15.7451H50.9292L51.9552 12.2412H51.9727L53.003 15.7451Z" fill="white"></path><path d="M56.6915 11.2183H55.9725V15.7451H56.7354V13.0813C56.7354 12.3152 57.2045 11.8103 57.9235 11.8103C58.625 11.8103 58.9714 12.2107 58.9714 12.942V15.7451H59.7343V12.807C59.7343 11.7798 59.1556 11.1399 58.1559 11.1399C57.45 11.1399 56.9633 11.4533 56.7091 11.9408H56.6915V11.2183Z" fill="white"></path><path d="M61.042 9.46415V15.7451H61.8049V9.46415H61.042Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.911 13.4817C62.911 14.9225 63.7615 15.8235 65.0243 15.8235C66.2826 15.8235 67.1332 14.9225 67.1332 13.4817C67.1332 12.0366 66.2826 11.1399 65.0243 11.1399C63.7615 11.1399 62.911 12.0366 62.911 13.4817ZM65.0242 15.1575C65.831 15.1575 66.3571 14.5481 66.3571 13.4817C66.3571 12.4153 65.831 11.8059 65.0242 11.8059C64.2175 11.8059 63.687 12.4153 63.687 13.4817C63.687 14.5481 64.2175 15.1575 65.0242 15.1575Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.5326 15.8235C68.625 15.8235 68.0156 15.2794 68.0156 14.4654C68.0156 13.6906 68.6163 13.2031 69.6685 13.1422L70.9751 13.0682V12.6895C70.9751 12.1367 70.6068 11.8059 69.9754 11.8059C69.3879 11.8059 69.0196 12.0801 68.9232 12.5241H68.1866C68.2392 11.7406 68.9144 11.1399 69.993 11.1399C71.0628 11.1399 71.738 11.7145 71.738 12.6155V15.7451H71.0145V14.966H70.997C70.7252 15.484 70.1464 15.8235 69.5326 15.8235ZM70.9751 14.0258C70.9751 14.6787 70.4226 15.1793 69.7036 15.1793C69.1555 15.1793 68.7916 14.8963 68.7916 14.4654C68.7916 14.0389 69.1424 13.769 69.7562 13.7298L70.9751 13.6558V14.0258Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M72.7826 13.4817C72.7826 14.9007 73.5718 15.8235 74.7337 15.8235C75.3914 15.8235 75.9131 15.5014 76.2069 14.979H76.22V15.7451H76.9478V9.46415H76.1849V11.9539H76.1674C75.8956 11.4577 75.3694 11.1399 74.7162 11.1399C73.5674 11.1399 72.7826 12.0627 72.7826 13.4817ZM74.8784 11.8059C74.0717 11.8059 73.5631 12.4588 73.5631 13.4817C73.5631 14.509 74.0717 15.1575 74.8784 15.1575C75.6632 15.1575 76.1893 14.4959 76.1893 13.4817C76.1893 12.4719 75.6632 11.8059 74.8784 11.8059Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M82.3079 15.8235C81.0452 15.8235 80.1946 14.9225 80.1946 13.4817C80.1946 12.0366 81.0452 11.1399 82.3079 11.1399C83.5663 11.1399 84.4168 12.0366 84.4168 13.4817C84.4168 14.9225 83.5663 15.8235 82.3079 15.8235ZM83.6408 13.4817C83.6408 14.5481 83.1147 15.1575 82.3079 15.1575C81.5012 15.1575 80.9707 14.5481 80.9707 13.4817C80.9707 12.4153 81.5012 11.8059 82.3079 11.8059C83.1147 11.8059 83.6408 12.4153 83.6408 13.4817Z" fill="white"></path><path d="M86.2025 11.2183H85.4834V15.7451H86.2463V13.0813C86.2463 12.3152 86.7154 11.8103 87.4345 11.8103C88.136 11.8103 88.4824 12.2107 88.4824 12.942V15.7451H89.2453V12.807C89.2453 11.7798 88.6665 11.1399 87.6669 11.1399C86.961 11.1399 86.4743 11.4533 86.22 11.9408H86.2025V11.2183Z" fill="white"></path><path d="M93.6627 10.1258H92.8998V11.2183H92.2202V11.8407H92.8998V14.5699C92.8998 15.4404 93.2243 15.7799 94.0617 15.7799C94.2414 15.7799 94.4519 15.7669 94.544 15.7451V15.1096C94.4914 15.1183 94.316 15.1314 94.2283 15.1314C93.8381 15.1314 93.6627 14.9442 93.6627 14.5307V11.8407H94.5484V11.2183H93.6627V10.1258Z" fill="white"></path><path d="M95.6982 9.46415V15.7451H96.4611V13.1074C96.4611 12.3239 96.9303 11.8103 97.6888 11.8103C98.4034 11.8103 98.7673 12.2412 98.7673 12.9594V15.7451H99.5302V12.8201C99.5302 11.8103 98.9252 11.1399 97.9255 11.1399C97.2328 11.1399 96.733 11.4359 96.4787 11.9408H96.4611V9.46415H95.6982Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M104.573 14.448H103.824C103.697 14.8746 103.271 15.1662 102.693 15.1662C101.873 15.1662 101.36 14.596 101.36 13.7298V13.6863H104.63V13.399C104.63 12.0279 103.872 11.1399 102.64 11.1399C101.382 11.1399 100.575 12.0932 100.575 13.4991C100.575 14.9225 101.368 15.8235 102.675 15.8235C103.67 15.8235 104.442 15.2402 104.573 14.448ZM102.627 11.7972C101.912 11.7972 101.412 12.3413 101.364 13.0943H103.841C103.824 12.3369 103.346 11.7972 102.627 11.7972Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M45.3018 31.1427L44.197 27.9019H39.5933L38.4884 31.1427H36.5382L40.8991 19.1517H42.9247L47.2856 31.1427H45.3018ZM40.0704 26.4061L41.87 21.1461H41.9202L43.7198 26.4061H40.0704Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.1019 26.7718C57.1019 24.0046 55.6287 22.2596 53.3939 22.2596C52.1216 22.2596 51.1088 22.8994 50.5898 23.9049H50.5564V22.4008H48.807V34.0345H50.6149V29.7051H50.6568C51.159 30.6773 52.1634 31.2922 53.4274 31.2922C55.6371 31.2922 57.1019 29.5389 57.1019 26.7718ZM52.9168 29.7716C54.3481 29.7716 55.2437 28.6082 55.2437 26.7718C55.2437 24.9436 54.3481 23.7719 52.9168 23.7719C51.5357 23.7719 50.6066 24.9685 50.6066 26.7718C50.6066 28.5916 51.5273 29.7716 52.9168 29.7716Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.4864 22.2596C65.7213 22.2596 67.1944 24.0046 67.1944 26.7718C67.1944 29.5389 65.7296 31.2922 63.5199 31.2922C62.256 31.2922 61.2515 30.6773 60.7493 29.7051H60.7075V34.0345H58.8995V22.4008H60.6489V23.9049H60.6824C61.2013 22.8994 62.2141 22.2596 63.4864 22.2596ZM65.3362 26.7718C65.3362 28.6082 64.4406 29.7716 63.0093 29.7716C61.6198 29.7716 60.6991 28.5916 60.6991 26.7718C60.6991 24.9685 61.6282 23.7719 63.0093 23.7719C64.4406 23.7719 65.3362 24.9436 65.3362 26.7718Z" fill="white"></path><path d="M74.4056 27.8022H72.5558C72.673 29.971 74.4809 31.3421 77.1594 31.3421C80.0221 31.3421 81.8217 29.9378 81.8217 27.6941C81.8217 25.9408 80.7921 24.9519 78.3145 24.3702L76.9837 24.0462C75.4268 23.6639 74.7906 23.1653 74.7906 22.3177C74.7906 21.2541 75.7867 20.5228 77.2431 20.5228C78.6996 20.5228 79.6956 21.2458 79.8044 22.4424H81.6291C81.5705 20.3733 79.8212 18.9523 77.2682 18.9523C74.6902 18.9523 72.8739 20.3733 72.8739 22.4424C72.8739 24.1126 73.9034 25.143 76.1215 25.6749L77.6868 26.0488C79.252 26.4311 79.9132 26.9878 79.9132 27.9185C79.9132 28.9905 78.8167 29.7716 77.2934 29.7716C75.703 29.7716 74.5395 28.9905 74.4056 27.8022Z" fill="white"></path><path d="M86.0383 20.3317H84.2219V22.4008H82.9413V23.8218H84.2219V28.8409C84.2219 30.5278 84.9167 31.2008 86.6995 31.2008C87.1013 31.2008 87.5031 31.1676 87.704 31.1177V29.6968C87.5868 29.7217 87.2938 29.7383 87.1097 29.7383C86.3731 29.7383 86.0383 29.3976 86.0383 28.6414V23.8218H87.7123V22.4008H86.0383V20.3317Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M88.9994 26.7718C88.9994 29.5888 90.6567 31.3089 93.1761 31.3089C95.6956 31.3089 97.3529 29.5888 97.3529 26.7718C97.3529 23.9631 95.6872 22.2429 93.1761 22.2429C90.665 22.2429 88.9994 23.9631 88.9994 26.7718ZM93.1761 29.8297C94.5991 29.8297 95.5114 28.7162 95.5114 26.7718C95.5114 24.8356 94.5907 23.7221 93.1761 23.7221C91.7615 23.7221 90.8408 24.8356 90.8408 26.7718C90.8408 28.7162 91.7615 29.8297 93.1761 29.8297Z" fill="white"></path><path d="M99.1589 22.4008H100.883V23.8883H100.925C101.218 22.8662 102.005 22.2596 103.043 22.2596C103.302 22.2596 103.528 22.3011 103.662 22.326V23.9963C103.52 23.9381 103.202 23.8966 102.85 23.8966C101.687 23.8966 100.967 24.6694 100.967 25.9075V31.1427H99.1589V22.4008Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M111.026 28.5812H112.742C112.491 30.1766 110.967 31.3151 108.95 31.3151C106.364 31.3151 104.798 29.5783 104.798 26.8195C104.798 24.0773 106.389 22.2492 108.875 22.2492C111.319 22.2492 112.842 23.961 112.842 26.6118V27.2267H106.623V27.3347C106.623 28.8554 107.544 29.8609 108.992 29.8609C110.021 29.8609 110.783 29.3457 111.026 28.5812ZM106.623 26.0752L111.026 26.0338C111.026 25.6655 110.871 24.9827 110.506 24.6207C110.141 24.2586 109.604 23.9837 108.875 23.9837C107.406 23.9837 106.623 24.9579 106.623 26.0752Z" fill="white"></path></svg></div><div class="my-4"><svg xmlns="http://www.w3.org/2000/svg" width="124" height="42" viewBox="0 0 124 42" fill="none"><rect width="124" height="42" rx="6" fill="#1C1C1C"></rect><path d="M38.1173 11.1907H35.5787V11.9386H37.3793C37.2902 12.9874 36.4113 13.4347 35.5818 13.4347C34.5204 13.4347 33.5941 12.6056 33.5941 11.4435C33.5941 10.3115 34.477 9.4397 35.584 9.4397C36.4382 9.4397 36.9415 9.98015 36.9415 9.98015L37.4689 9.43788C37.4689 9.43788 36.7919 8.68964 35.5571 8.68964C33.9847 8.68964 32.7684 10.0071 32.7684 11.4301C32.7684 12.8246 33.9126 14.1841 35.5971 14.1841C37.0788 14.1841 38.1634 13.1766 38.1634 11.6866C38.1634 11.3723 38.1173 11.1907 38.1173 11.1907Z" fill="white"></path><path d="M38.5956 23.2445H44.1741C44.178 23.2602 44.275 23.6573 44.275 24.334C44.275 27.6082 41.8918 29.8224 38.6362 29.8224C34.9344 29.8224 32.4202 26.8347 32.4202 23.7706C32.4202 20.6437 35.0931 17.7486 38.5481 17.7487C41.2614 17.7487 42.7492 19.3929 42.7492 19.3929L41.59 20.5845C41.59 20.5845 40.4842 19.3967 38.6073 19.3967C36.1749 19.3967 34.2348 21.3124 34.2348 23.7999C34.2348 26.3533 36.27 28.1752 38.6023 28.1752C40.4252 28.1752 42.3565 27.1923 42.552 24.8879H38.5956V23.2445Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.9867 25.903C44.9867 23.8309 46.6271 22.0543 48.9162 22.0543C50.7978 22.0543 52.8382 23.378 52.8382 25.9482C52.8382 28.1906 51.0841 29.8153 48.9429 29.8153C46.5777 29.8153 44.9867 28.0057 44.9867 25.903ZM51.1313 25.9379C51.1313 24.482 50.0646 23.5785 48.9389 23.5785C47.6741 23.5785 46.702 24.5824 46.702 25.9266C46.702 27.3003 47.6862 28.2921 48.9337 28.2921C50.069 28.2921 51.1313 27.3628 51.1313 25.9379Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.555 22.0543C55.266 22.0543 53.6255 23.8309 53.6255 25.903C53.6255 28.0057 55.2166 29.8153 57.582 29.8153C59.723 29.8153 61.4772 28.1906 61.4772 25.9482C61.4772 23.378 59.4368 22.0543 57.555 22.0543ZM57.5778 23.5785C58.7034 23.5785 59.7702 24.482 59.7702 25.9379C59.7702 27.3628 58.7079 28.2921 57.5725 28.2921C56.3251 28.2921 55.341 27.3003 55.341 25.9266C55.341 24.5824 56.3129 23.5785 57.5778 23.5785Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M62.2641 25.9357C62.2641 23.8853 63.9158 22.0584 66.0167 22.0584C66.9315 22.0584 67.6205 22.4099 68.1244 22.949V22.2917H69.7632V29.2646C69.7632 32.0043 68.1711 33.3103 66.082 33.3103C64.1722 33.3103 63.0994 32.1446 62.5663 31.0252L64.0686 30.4018C64.2767 30.9018 64.8756 31.7836 66.0695 31.7836C67.3055 31.7836 68.1243 30.9815 68.1243 29.6427V28.8775C67.687 29.3813 67.0947 29.8205 65.9805 29.8205C64.1788 29.8205 62.2641 28.2715 62.2641 25.9357ZM66.1688 23.5796C67.199 23.5796 68.2568 24.4528 68.2568 25.944C68.2568 27.4598 67.2012 28.2951 66.1461 28.2951C65.0261 28.2951 63.9838 27.3922 63.9838 25.9584C63.9838 24.4686 65.0663 23.5796 66.1688 23.5796Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M73.7486 25.9245C73.7486 23.6146 75.4125 22.0491 77.3944 22.0491C78.9576 22.0491 80.1387 23.0841 80.645 24.3232L80.9172 24.9559L75.6759 27.1149C75.989 27.6935 76.4943 28.2909 77.593 28.291C78.5713 28.291 79.1575 27.763 79.5082 27.2227L80.8593 28.1153C80.2535 28.9201 79.2386 29.8183 77.5848 29.8183C75.6033 29.8183 73.7486 28.3687 73.7486 25.9245ZM77.4628 23.5416C78.177 23.5416 78.6909 23.9184 78.9092 24.3705L75.409 25.8228C75.2581 24.6984 76.3313 23.5416 77.4628 23.5416Z" fill="white"></path><path d="M72.7991 29.5879H71.0775V18.1501H72.7991V29.5879Z" fill="white"></path><path d="M94.1596 29.5879H95.8812V18.1501H94.1596V29.5879Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.7517 29.5879H85.0301V18.1501L89.1945 18.1499C91.2132 18.1499 92.8648 19.7896 92.8648 21.7937C92.8648 23.7977 91.2132 25.4373 89.1945 25.4373H86.7517V29.5879ZM86.7516 23.7282V19.8591H89.1945C90.263 19.8591 91.1433 20.7329 91.1433 21.7937C91.1433 22.8544 90.263 23.7282 89.1945 23.7282H86.7516Z" fill="white"></path><path d="M108.592 33.3103L113.577 22.0493H111.696L109.441 27.1452L107.185 22.0493H105.305L108.5 29.2692L106.712 33.3103H108.592Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.927 29.5879H104.649V25.4742C104.918 21.2314 99.4999 20.2336 97.4497 23.2921L98.8351 24.215C99.8375 22.4751 102.698 22.8755 102.886 24.7401C102.026 24.514 101.098 24.3501 100.249 24.4353C98.9247 24.5684 97.7907 25.4034 97.6105 26.7712C97.5131 27.5103 97.6793 28.4213 98.199 28.9765C99.0089 29.8415 100.339 29.9581 101.431 29.6625C102.046 29.4961 102.53 29.1333 102.927 28.6647V29.5879ZM101.022 28.1717C101.964 27.9169 102.707 27.2327 102.927 26.2816C102.445 26.1267 102.002 26.0017 101.494 25.9408C98.5359 25.4993 99.0312 28.7104 101.022 28.1717Z" fill="white"></path><path d="M49.2771 14.0775H48.4937V8.87231H49.2771V14.0775Z" fill="white"></path><path d="M44.1061 14.0775H44.8896V9.65006H46.1757V8.87231H42.82V9.65006H44.1061V14.0775Z" fill="white"></path><path d="M41.994 14.0775H38.9893V8.87231H41.994V9.65006H39.7729V11.0861H41.7266V11.8638H39.7729V13.2997H41.994V14.0775Z" fill="white"></path><path d="M51.9844 14.0775V9.65006H53.2705V8.87231H49.915V9.65006H51.201V14.0775H51.9844Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M55.2864 11.4301C55.2864 10.007 56.5028 8.68964 58.0751 8.68964C59.6475 8.68964 60.8639 10.007 60.8639 11.4301C60.8639 12.8134 59.7378 14.1623 58.0751 14.1836C56.4125 14.1623 55.2864 12.8134 55.2864 11.4301ZM58.0751 13.4343C57.0241 13.4215 56.1122 12.5966 56.1122 11.4435C56.1122 10.3207 56.9808 9.45397 58.0751 9.43995C59.1695 9.45397 60.0381 10.3207 60.0381 11.4435C60.0381 12.5966 59.1262 13.4215 58.0751 13.4343Z" fill="white"></path><path d="M62.43 14.0775H61.6464V8.87231H62.43L64.9449 12.6619V8.87231H65.7285V14.0775H64.9463L62.43 10.286V14.0775Z" fill="white"></path><path d="M11.3758 15.1822L20.2279 23.9572L11.4183 32.8091C11.1612 32.647 11.0234 32.2958 11.021 31.8421L10.9412 16.1313C10.9387 15.6345 11.1208 15.3315 11.3758 15.1822Z" fill="white"></path><path d="M12.3827 15.1941L23.147 21.0242L20.5941 23.5892L12.0071 15.0769C12.1372 15.0938 12.2678 15.1317 12.3827 15.1941Z" fill="white"></path><path d="M23.6257 26.5943L20.9628 23.9546L23.623 21.282L27.2863 23.2659C28.1887 23.7544 27.7271 24.3656 27.2863 24.6051L23.6257 26.5943Z" fill="white"></path><path d="M12.3827 32.7031C12.3014 32.7482 12.223 32.7835 12.148 32.8116L20.5967 24.3227L23.1492 26.853L12.3827 32.7031Z" fill="white"></path></svg></div></div><div class="col-span-1"><div class="my-2 text-secondary-orange font-semibold">Contactanos</div><a href="https://www.google.com/maps/place/GLIK+7/@10.4940965,-66.8547532,17z/data=!3m1!4b1!4m6!3m5!1s0x8c2af70856c1a779:0x77aa75f245771c40!8m2!3d10.4940965!4d-66.8547532!16s%2Fg%2F11svrs7m27?entry=ttu"><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"></path><path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg></span>Casa 1722 C. Sucre, Caracas 1060, Miranda.</p></a><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"></path></svg></span> ventas@glik7.com</p><p class="my-6 flex items-center text-white"><span class="pr-2 "><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="white"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"></path></svg></span>04128229919</p></div><div class="col-span-1"><div class="my-2 ml-2 text-secondary-orange font-semibold">Extra</div><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Nosotros</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Cómo funciona</p><p class="my-6 flex items-center text-white"><span class="pr-2 "></span>Terminos y condiciones</p></div><div class="col-span-1 mt-4"><div class="space-y-3"><a href="https://www.instagram.com/glik.ve/"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g><path d="M127.999746,23.06353 C162.177385,23.06353 166.225393,23.1936027 179.722476,23.8094161 C192.20235,24.3789926 198.979853,26.4642218 203.490736,28.2166477 C209.464938,30.5386501 213.729395,33.3128586 218.208268,37.7917319 C222.687141,42.2706052 225.46135,46.5350617 227.782844,52.5092638 C229.535778,57.0201472 231.621007,63.7976504 232.190584,76.277016 C232.806397,89.7746075 232.93647,93.8226147 232.93647,128.000254 C232.93647,162.177893 232.806397,166.225901 232.190584,179.722984 C231.621007,192.202858 229.535778,198.980361 227.782844,203.491244 C225.46135,209.465446 222.687141,213.729903 218.208268,218.208776 C213.729395,222.687649 209.464938,225.461858 203.490736,227.783352 C198.979853,229.536286 192.20235,231.621516 179.722476,232.191092 C166.227425,232.806905 162.179418,232.936978 127.999746,232.936978 C93.8200742,232.936978 89.772067,232.806905 76.277016,232.191092 C63.7971424,231.621516 57.0196391,229.536286 52.5092638,227.783352 C46.5345536,225.461858 42.2700971,222.687649 37.7912238,218.208776 C33.3123505,213.729903 30.538142,209.465446 28.2166477,203.491244 C26.4637138,198.980361 24.3784845,192.202858 23.808908,179.723492 C23.1930946,166.225901 23.0630219,162.177893 23.0630219,128.000254 C23.0630219,93.8226147 23.1930946,89.7746075 23.808908,76.2775241 C24.3784845,63.7976504 26.4637138,57.0201472 28.2166477,52.5092638 C30.538142,46.5350617 33.3123505,42.2706052 37.7912238,37.7917319 C42.2700971,33.3128586 46.5345536,30.5386501 52.5092638,28.2166477 C57.0196391,26.4642218 63.7971424,24.3789926 76.2765079,23.8094161 C89.7740994,23.1936027 93.8221066,23.06353 127.999746,23.06353 M127.999746,0 C93.2367791,0 88.8783247,0.147348072 75.2257637,0.770274749 C61.601148,1.39218523 52.2968794,3.55566141 44.1546281,6.72008828 C35.7374966,9.99121548 28.5992446,14.3679613 21.4833489,21.483857 C14.3674532,28.5997527 9.99070739,35.7380046 6.71958019,44.1551362 C3.55515331,52.2973875 1.39167714,61.6016561 0.769766653,75.2262718 C0.146839975,88.8783247 0,93.2372872 0,128.000254 C0,162.763221 0.146839975,167.122183 0.769766653,180.774236 C1.39167714,194.398852 3.55515331,203.703121 6.71958019,211.845372 C9.99070739,220.261995 14.3674532,227.400755 21.4833489,234.516651 C28.5992446,241.632547 35.7374966,246.009293 44.1546281,249.28042 C52.2968794,252.444847 61.601148,254.608323 75.2257637,255.230233 C88.8783247,255.85316 93.2367791,256 127.999746,256 C162.762713,256 167.121675,255.85316 180.773728,255.230233 C194.398344,254.608323 203.702613,252.444847 211.844864,249.28042 C220.261995,246.009293 227.400247,241.632547 234.516143,234.516651 C241.632039,227.400755 246.008785,220.262503 249.279912,211.845372 C252.444339,203.703121 254.607815,194.398852 255.229725,180.774236 C255.852652,167.122183 256,162.763221 256,128.000254 C256,93.2372872 255.852652,88.8783247 255.229725,75.2262718 C254.607815,61.6016561 252.444339,52.2973875 249.279912,44.1551362 C246.008785,35.7380046 241.632039,28.5997527 234.516143,21.483857 C227.400247,14.3679613 220.261995,9.99121548 211.844864,6.72008828 C203.702613,3.55566141 194.398344,1.39218523 180.773728,0.770274749 C167.121675,0.147348072 162.762713,0 127.999746,0 Z M127.999746,62.2703115 C91.698262,62.2703115 62.2698034,91.69877 62.2698034,128.000254 C62.2698034,164.301738 91.698262,193.730197 127.999746,193.730197 C164.30123,193.730197 193.729689,164.301738 193.729689,128.000254 C193.729689,91.69877 164.30123,62.2703115 127.999746,62.2703115 Z M127.999746,170.667175 C104.435741,170.667175 85.3328252,151.564259 85.3328252,128.000254 C85.3328252,104.436249 104.435741,85.3333333 127.999746,85.3333333 C151.563751,85.3333333 170.666667,104.436249 170.666667,128.000254 C170.666667,151.564259 151.563751,170.667175 127.999746,170.667175 Z M211.686338,59.6734287 C211.686338,68.1566129 204.809755,75.0337031 196.326571,75.0337031 C187.843387,75.0337031 180.966297,68.1566129 180.966297,59.6734287 C180.966297,51.1902445 187.843387,44.3136624 196.326571,44.3136624 C204.809755,44.3136624 211.686338,51.1902445 211.686338,59.6734287 Z" fill="white"></path></g></svg></div></a><a href="https://api.whatsapp.com/send/?phone=%2B584128229919&text&type=phone_number&app_absent=0"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 258" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>WhatsApp</title><defs><linearGradient x1="49.9999726%" y1="100.000225%" x2="49.9999726%" y2="4.85578831e-05%" id="whatsappLinearGradient-1"><stop stop-color="#1FAF38" offset="0%"></stop><stop stop-color="#60D669" offset="100%"></stop></linearGradient><linearGradient x1="50.0000414%" y1="100.000108%" x2="50.0000414%" y2="-0.000129944756%" id="whatsappLinearGradient-2"><stop stop-color="#F9F9F9" offset="0%"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs><g><path d="M5.46329987,127.456258 C5.45681909,149.133181 11.1210232,170.299417 21.890788,188.954998 L21.890788,188.954998 L4.43285541,252.697385 L69.6645263,235.593304 C87.6357369,245.388359 107.871333,250.558727 128.464668,250.563912 L128.464668,250.563912 L128.519107,250.563912 C196.334018,250.563912 251.537325,195.380046 251.565851,127.55347 L251.565851,127.55347 C251.578802,94.6855323 238.790922,63.7799755 215.557316,40.5282231 L215.557316,40.5282231 C192.327598,17.2777669 161.43241,4.46655548 128.513922,4.45229776 L128.513922,4.45229776 C60.6912344,4.45229776 5.49181531,59.6322745 5.46329987,127.456258" fill="url(#whatsappLinearGradient-1)"></path><path d="M1.07062531,127.416078 C1.06284837,149.873286 6.93054909,171.796478 18.0839762,191.11958 L18.0839762,191.11958 L0,257.147091 L67.5712334,239.429927 C86.1892261,249.581425 107.15067,254.933255 128.481518,254.941032 L128.481518,254.941032 L128.535957,254.941032 C198.783754,254.941032 255.970181,197.772751 256,127.518474 L256,127.518474 C256.011658,93.4697375 242.763642,61.4533745 218.700495,37.3681934 L218.700495,37.3681934 C194.63346,13.2856047 162.632651,0.0142577221 128.535957,0 L128.535957,0 C58.2751986,0 1.09914076,57.1592078 1.07062531,127.416078 L1.07062531,127.416078 Z M41.3098055,187.792346 L38.7874848,183.787222 C28.1810358,166.922929 22.5829356,147.435216 22.5907045,127.423855 L22.5907045,127.423855 C22.6140434,69.0294095 70.1376234,21.5213834 128.576138,21.5213834 L128.576138,21.5213834 C156.875124,21.5330488 183.472256,32.5646372 203.47584,52.5811829 L203.47584,52.5811829 C223.479424,72.5990247 234.486386,99.2091187 234.478613,127.510697 L234.478613,127.510697 C234.452686,185.906438 186.92781,233.420945 128.535957,233.420945 L128.535957,233.420945 L128.49448,233.420945 C109.481159,233.410576 90.8346512,228.305015 74.571775,218.656426 L74.571775,218.656426 L70.7014515,216.360933 L30.6035524,226.874058 L41.3098055,187.792346 Z" fill="url(#whatsappLinearGradient-2)"></path><path d="M96.6782434,74.1484502 C94.2920192,68.8445776 91.781364,68.7382928 89.5117939,68.6449695 C87.6544015,68.565904 85.5300009,68.5710189 83.4081926,68.5710189 C81.2837921,68.5710189 77.8334233,69.369521 74.9157749,72.5554738 C71.9955342,75.7427228 63.7675324,83.4470773 63.7675324,99.1163139 C63.7675324,114.786847 75.181487,129.928547 76.7718711,132.05554 C78.3648475,134.178645 98.8052363,167.362845 131.176746,180.128691 C158.081068,190.737732 163.556033,188.627589 169.395218,188.096165 C175.234404,187.566037 188.238742,180.394403 190.891975,172.957057 C193.546503,165.521006 193.546503,159.146509 192.750663,157.815356 C191.954823,156.488091 189.830423,155.690955 186.645766,154.099275 C183.459813,152.506298 167.802242,144.800648 164.883297,143.737799 C161.963057,142.676247 159.839952,142.146119 157.715552,145.334664 C155.592447,148.519321 149.492734,155.690955 147.634046,157.815356 C145.776654,159.943645 143.917965,160.209357 140.733309,158.61638 C137.547356,157.018219 127.289573,153.658582 115.121255,142.809751 C105.652831,134.367884 99.2614834,123.942897 97.4027949,120.754351 C95.5454026,117.569695 97.204483,115.84451 98.8013479,114.256719 C100.232305,112.82965 101.987301,110.538045 103.580277,108.679357 C105.169365,106.819372 105.699493,105.492108 106.761045,103.367707 C107.823894,101.242011 107.292469,99.382026 106.496629,97.7890496 C105.699493,96.1960732 99.5103455,80.4464749 96.6782434,74.1484502" fill="#FFFFFF"></path></g></svg></div></a><a href="https://www.tiktok.com/@glik7"><div class="py-2"><svg width="25" height="25" viewBox="0 0 256 290" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><title>TikTok</title><g><path d="M189.720224,104.421475 C208.398189,117.766281 231.279538,125.618095 255.992548,125.618095 L255.992548,78.0872726 C251.315611,78.0882654 246.650588,77.6008156 242.074913,76.6318726 L242.074913,114.045382 C217.363889,114.045382 194.485518,106.193568 175.80259,92.8497541 L175.80259,189.846306 C175.80259,238.368905 136.447224,277.701437 87.902784,277.701437 C69.7897057,277.701437 52.9543216,272.228299 38.9691786,262.841664 C54.9309256,279.153859 77.1908018,289.273158 101.81744,289.273158 C150.364858,289.273158 189.72221,249.940626 189.72221,201.416041 L189.72221,104.421475 L189.720224,104.421475 Z M206.889179,56.4687254 C197.343701,46.0456391 191.076347,32.5757434 189.720224,17.6842019 L189.720224,11.5707278 L176.531282,11.5707278 C179.851103,30.497877 191.174632,46.6681056 206.889179,56.4687254 L206.889179,56.4687254 Z M69.6735517,225.606854 C64.3403943,218.617757 61.4583846,210.068027 61.4712906,201.277053 C61.4712906,179.084685 79.472186,161.090739 101.680438,161.090739 C105.819294,161.089747 109.933331,161.723134 113.877603,162.974023 L113.877603,114.380938 C109.268175,113.749536 104.616057,113.481488 99.9659254,113.579773 L99.9659254,151.402303 C96.0186741,150.151413 91.9026521,149.516041 87.7628035,149.520012 C65.5545513,149.520012 47.5546487,167.511972 47.5546487,189.707318 C47.5546487,205.401018 56.552118,218.98806 69.6735517,225.606854 Z" fill="#FF004F"></path><path d="M175.80259,92.8487613 C194.485518,106.192575 217.363889,114.044389 242.074913,114.044389 L242.074913,76.6308799 C228.281375,73.6942679 216.070311,66.4897401 206.889179,56.4687254 C191.173639,46.6671128 179.851103,30.4968842 176.531282,11.5707278 L141.8876,11.5707278 L141.8876,201.414056 C141.809172,223.545865 123.839052,241.466346 101.678453,241.466346 C88.6195635,241.466346 77.0180599,235.24466 69.6705734,225.606854 C56.5501325,218.98806 47.5526631,205.400025 47.5526631,189.708311 C47.5526631,167.51495 65.5525657,149.521004 87.760818,149.521004 C92.0158278,149.521004 96.1169583,150.183182 99.9639399,151.403295 L99.9639399,113.580765 C52.272289,114.565593 13.9166419,153.513923 13.9166419,201.415048 C13.9166419,225.326893 23.4680767,247.004014 38.9701714,262.842657 C52.9553144,272.228299 69.7906985,277.70243 87.9037768,277.70243 C136.449209,277.70243 175.803582,238.367912 175.803582,189.846306 L175.803582,92.8487613 L175.80259,92.8487613 Z" fill="#000000"></path><path d="M242.074913,76.6308799 L242.074913,66.5145593 C229.636505,66.5334219 217.442318,63.0517795 206.889179,56.4677326 C216.231139,66.6902795 228.532545,73.7389425 242.074913,76.6308799 Z M176.531282,11.5707278 C176.214589,9.76190185 175.971361,7.9411627 175.80259,6.11347418 L175.80259,0 L127.968973,0 L127.968973,189.845313 C127.89253,211.974144 109.923403,229.894625 87.760818,229.894625 C81.2542071,229.894625 75.1109499,228.350869 69.6705734,225.607847 C77.0180599,235.24466 88.6195635,241.465353 101.678453,241.465353 C123.837066,241.465353 141.810164,223.546857 141.8876,201.415048 L141.8876,11.5707278 L176.531282,11.5707278 Z M99.9659254,113.580765 L99.9659254,102.811203 C95.9690357,102.265179 91.9393845,101.991175 87.9047695,101.99315 C39.3553659,101.99315 0,141.326686 0,189.845313 C0,220.263769 15.4673478,247.071522 38.9711641,262.840672 C23.4690694,247.003021 13.9176347,225.324907 13.9176347,201.414056 C13.9176347,153.513923 52.272289,114.565593 99.9659254,113.580765 Z" fill="#00F2EA"></path></g></svg></div></a></div></div></div></footer></div><script src="/_next/static/chunks/webpack.js" async=""></script><script src="/_next/static/chunks/main-app.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"0:\"$L1\"\n"])</script><script>self.__next_f.push([1,"2:HL[\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/app-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n5:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/error-boundary.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"\",\"async\":false}\n6:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/layout-router.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-inte"])</script><script>self.__next_f.push([1,"rnals.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":\"(app-client)/./node_modules/next/dist/client/components/render-from-template-context.js\",\"chunks\":[\"app-client-internals:static/chunks/app-client-internals.js\"],\"name\":\"default\",\"async\":false}\n8:I{\"id\":\"(app-client)/./src/config/Providers.config.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"Providers\",\"async\":false}\n9:I{\"id\":\"(app-client)/./src/components/navbar.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:st"])</script><script>self.__next_f.push([1,"atic/chunks/app/(dashboard)/layout.js\"],\"name\":\"Navbar\",\"async\":false}\na:I{\"id\":\"(app-client)/./src/socialNetworksButton.component.tsx\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"\",\"async\":false}\nb:I{\"id\":\"(app-client)/./node_modules/next/dist/client/image-component.js\",\"chunks\":[\"app/(dashboard)/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"Image\",\"async\":false}\nc:I{\"id\":\"(app-client)/./src/components/Product/productsList.component.tsx\",\"chunks\":[\"app/(dashboard)"])</script><script>self.__next_f.push([1,"/page:static/chunks/app/(dashboard)/page.js\"],\"name\":\"ProductsList\",\"async\":false}\nd:I{\"id\":\"(app-client)/./src/components/Footer/footer.component.tsx\",\"chunks\":[\"app/(dashboard)/layout:static/chunks/app/(dashboard)/layout.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"1:[[],[\"$\",\"$L3\",null,{\"buildId\":\"development\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"(dashboard)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialHead\":[\"$L4\",null],\"globalErrorComponent\":\"$5\",\"notFound\":\"$undefined\",\"asNotFound\":false,\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"bg-offwhite __className_e66fe9\",\"children\":[\"$\",\"$L8\",null,{\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"className\":\"grid grid-cols-4 2xl:grid-cols-8 mx-4 gap-4 2xl:gap-4 2xl:mx-48\",\"children\":[\"$\",\"section\",null,{\"className\":\"col-span-4 2xl:col-span-8\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(dashboard)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[[\"$\",\"main\",null,{\"className\":\"space-y-7\",\"children\":[[\"$\",\"div\",null,{\"className\":\"fixed bottom-5 right-5\",\"children\":[\" \",[\"$\",\"$La\",null,{}]]}],[\"$\",\"figure\",null,{\"children\":[\"$\",\"$Lb\",null,{\"src\":{\"src\":\"/_next/static/media/glik_banner.126325ef.webp\",\"height\":509,\"width\":1532,\"blurDataURL\":\"/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fglik_banner.126325ef.webp\u0026w=8\u0026q=70\",\"blurWidth\":8,\"blurHeight\":3},\"alt\":\"Imagen del banner de Glik: ARRENDAMIENTO DE MOTOS\",\"width\":1920,\"height\":1080,\"className\":\"mx-auto mt-5\"}]}],[\"$\",\"h3\",null,{\"className\":\"text-lg font-bold 2xl:text-3xl text-center 2xl:text-left\",\"children\":\"Modelos disponibles\"}],[\"$\",\"$Lc\",null,{}]]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}]}]}],[\"$\",\"$Ld\",null,{}]]}]}]}],null],\"segment\":\"(dashboard)\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/app/(dashboard)/layout.css?v=1701471471735\",\"precedence\":\"next_static/css/app/(dashboard)/layout.css\"}]]}]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Glik\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Página de la plataforma de arrendamientos: Glik\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"any\"}]]\n"])</script></body></html>
Evidence from
Solution Eliminar todos los comentarios que devuelvan información que podría ayudar a un atacante y arreglar cualquier problema subyacente al que se refieran.
-
-
Appendix
Alert types
This section contains additional information on the types of alerts in the report.
-
Metadatos de la Nube Potencialmente Expuestos
Source raised by an active scanner (Metadatos de la Nube Potencialmente Expuestos) Reference -
Ausencia de Ttokens Anti-CSRF
Source raised by a passive scanner (Ausencia de Ttokens Anti-CSRF) CWE ID 352 WASC ID 9 Reference -
Cabecera Content Security Policy (CSP) no configurada
-
Falta de cabecera Anti-Clickjacking
Source raised by a passive scanner (Cabecera Anti-Clickjacking) CWE ID 1021 WASC ID 15 Reference -
Divulgación de la marca de hora - Unix
Source raised by a passive scanner (Divulgación de la marca de hora) CWE ID 200 WASC ID 13 Reference -
El servidor divulga información mediante un campo(s) de encabezado de respuesta HTTP ''''X-Powered-By''''
Source raised by a passive scanner (El servidor divulga información mediante un campo(s) de encabezado de respuesta HTTP ''''X-Powered-By'''') CWE ID 200 WASC ID 13 Reference -
X-Content-Type-Options Header Missing
Source raised by a passive scanner (X-Content-Type-Options Header Missing) CWE ID 693 WASC ID 15 Reference -
Divulgación de Información - Información sensible en URL
Source raised by a passive scanner (Divulgación de Información - Información sensible en URL) CWE ID 200 WASC ID 13 -
Divulgación de información - Comentarios sospechosos
Source raised by a passive scanner (Divulgación de información - Comentarios sospechosos) CWE ID 200 WASC ID 13 -
Modern Web Application
Source raised by a passive scanner (Modern Web Application) -
User Agent Fuzzer
Source raised by an active scanner (User Agent Fuzzer) Reference