import{j as e}from"./vendor-react-RSDKEZ60.js";import{bb as t,k0 as n}from"./c818056db-BBpc4u6S.js";const o=n=>e.jsx(t,{...n,children:e.jsx("path",{d:"M17.225 2.082a.5.5 0 0 1 .693.693l-.064.078-15 15a.5.5 0 1 1-.708-.707l2.986-2.986c-1.063-.864-1.909-1.87-2.476-2.642l-.245-.342a2.09 2.09 0 0 1-.039-2.36C3.41 7.24 6.012 4 10 4c1.555 0 2.881.495 3.973 1.187l.079.052 3.095-3.093zM15.52 7.12a.5.5 0 0 1 .632-.016l.074.07.358.428c.346.423.652.822.9 1.158.54.73.613 1.722.09 2.506C16.503 12.866 13.921 16 10 16a7 7 0 0 1-1.9-.257l-.25-.074-.094-.04a.501.501 0 0 1 .296-.935l.098.022.216.063A6 6 0 0 0 10 15c3.375 0 5.695-2.724 6.741-4.29.27-.405.25-.937-.06-1.356-.24-.325-.536-.71-.87-1.117l-.345-.412-.058-.083a.5.5 0 0 1 .113-.622M10 5C6.567 5 4.226 7.818 3.208 9.366a1.09 1.09 0 0 0 .023 1.238c.541.776 1.445 1.918 2.61 2.845l1.715-1.713A3 3 0 0 1 10 7a3 3 0 0 1 1.735.557l1.59-1.591-.083-.053C12.322 5.367 11.242 5 10 5m2.55 5.01a.5.5 0 0 1 .39.59 3 3 0 0 1-2.123 2.288l-.217.052a.5.5 0 0 1-.2-.98l.145-.035A2 2 0 0 0 11.96 10.4a.5.5 0 0 1 .59-.39M10 8a2 2 0 0 0-1.722 3.014l2.736-2.736A2 2 0 0 0 10 8"})});function r(e){return n(e)}function s(e){if(!e)return null;const t=e.trim();if(t.startsWith("https://lh3.googleusercontent.com/places/"))return t;if(t.startsWith("/images/")&&!t.includes("..")&&!t.includes("%"))return t;try{const e=new URL(t);if("https:"===e.protocol&&e.hostname.endsWith(".googleusercontent.com"))return t}catch{}return null}function i(e){return e&&Array.isArray(e)?e.filter(e=>null!==s(e.url)):[]}function a(e){if(!e||!Array.isArray(e))return null;for(const t of e){const e=s(t.url);if(e)return e}return null}function l(e){if(null===e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.name&&"number"==typeof t.latitude&&"number"==typeof t.longitude&&isFinite(t.latitude)&&isFinite(t.longitude)&&t.latitude>=-90&&t.latitude<=90&&t.longitude>=-180&&t.longitude<=180}function c(e){return e.filter(l)}function d(e){if(!e||"object"!=typeof e)return null;const t=e,n=["driving","walking","transit","bicycling"].includes(t.travel_mode)?t.travel_mode:"driving",o=t.days&&Array.isArray(t.days)&&t.days.length>0,r=t.mode?t.mode:o?"itinerary":"markers";if(o&&t.days){const e=[];for(const n of t.days)if(n&&"object"==typeof n&&"number"==typeof n.day_number&&Array.isArray(n.locations)){const t=c(n.locations);t.length>0&&e.push({day_number:n.day_number,title:"string"==typeof n.title?n.title:void 0,narrative:"string"==typeof n.narrative?n.narrative:void 0,locations:t})}if(0===e.length)return null;e.sort((e,t)=>e.day_number-t.day_number);const o=e.flatMap(e=>e.locations);return{title:t.title,narrative:"string"==typeof t.narrative?t.narrative:void 0,mode:r,locations:o,days:e,travelMode:n,showRoute:!1!==t.show_route}}if(!t.locations||!Array.isArray(t.locations)||0===t.locations.length)return null;const s=c(t.locations);return 0===s.length?null:{title:t.title,narrative:"string"==typeof t.narrative?t.narrative:void 0,mode:r,locations:s,days:[{day_number:1,narrative:"string"==typeof t.narrative?t.narrative:void 0,locations:s}],travelMode:n,showRoute:!1!==t.show_route}}function p(e,t="driving"){if(e.length<2)return null;let n=e;if(e.length>12){const t=e[0],o=e[e.length-1],r=e.slice(1,-1),s=[],i=r.length/10;for(let e=0;e<10;e++){const t=Math.floor(e*i);r[t]&&s.push(r[t])}n=[t,...s,o]}const o=n[0],r=n[n.length-1],s=n.slice(1,-1),i=new URLSearchParams;i.set("api","1");const a=o.name??o.address??`${o.latitude},${o.longitude}`;i.set("origin",a),o.place_id&&i.set("origin_place_id",o.place_id);const l=r.name??r.address??`${r.latitude},${r.longitude}`;if(i.set("destination",l),r.place_id&&i.set("destination_place_id",r.place_id),s.length>0){const e=s.map(e=>e.name??e.address??`${e.latitude},${e.longitude}`);i.set("waypoints",e.join("|"))}return i.set("travelmode",t),`https://www.google.com/maps/dir/?${i.toString()}`}function m(e){if(!e||"object"!=typeof e)return null;const t=e,n=d(t.input);if(!n)return null;if(!t.enriched_places)return n;const o=n.days.map(e=>({...e,locations:e.locations.map(e=>function(e,t){if(!t||!e.place_id)return e;const n=t[e.place_id];return n?{...e,place_id:n.override_place_id??e.place_id,rating:n.rating??e.rating,rating_count:n.rating_count??e.rating_count,types:n.types??e.types,website:n.website??e.website,maps_url:n.maps_url??e.maps_url,photos:n.photos??e.photos,phone_number:n.phone_number??e.phone_number,weekday_hours:n.weekday_hours??e.weekday_hours,price_level:n.price_level??e.price_level}:e}(e,t.enriched_places))})),r=o.flatMap(e=>e.locations);return{...n,locations:r,days:o}}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const g=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},language:{defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@typeKeywords":"type.identifier","@keywords":"keyword","@default":"identifier"}}],[/[A-Z_$][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/@[a-zA-Z]+/,"annotation"],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var u={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}};const b=Object.freeze(Object.defineProperty({__proto__:null,conf:u,language:{defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[/<!--/,"comment","@comment"]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,"comment","@pop"],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],tag:[[/[ \t\r\n]+/,"white"],[/(type)(\s*=\s*)(")([^"]+)(")/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(type)(\s*=\s*)(')([^']+)(')/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name.html","delimiter.html","string.html"]],[/\w+/,"attribute.name.html"],[/\/>/,"tag","@pop"],[/>/,{cases:{"$S2==style":{token:"tag",switchTo:"embeddedStyle",nextEmbedded:"text/css"},"$S2==script":{cases:{$S3:{token:"tag",switchTo:"embeddedScript",nextEmbedded:"$S3"},"@default":{token:"tag",switchTo:"embeddedScript",nextEmbedded:"text/javascript"}}},"@default":{token:"tag",next:"@pop"}}}]],embeddedStyle:[[/[^<]+/,""],[/<\/style\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]],embeddedScript:[[/[^<]+/,""],[/<\/script\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]]}}},Symbol.toStringTag,{value:"Module"}));export{o as E,m as a,p as b,i as c,r as d,g as e,a as g,s as i,b as m,d as p};
