L i8^UddlmZddlZddlmZddlmZddlmZddl m Z m Z m Z m Z mZmZddlmZmZddlmZdd lmZmZmZmZdd lmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(e rddl m)Z)dZ*de+d<dZ,de+d<dZ-de+d<ee.zZ/de+d<e dZ0de+d<e dZ1de+d<e dZ2de+d<e d Z3de+d!<e d"Z4de+d#<e e2e3e4fZ5de+d$<ee5e.dzfZ6de+d%<e7d&Z8de+d'<d0d(Z9d1d)Z:e!d* d2 d3d+Z;d4d,Z< d5d-Z=d6d.Z>d7d/Z?y)8) annotationsN)Mapping)Path)dedent) TYPE_CHECKINGAnyFinalLiteral TypeAliascast) AtomicImage image_to_url) LayoutConfig) StreamlitInvalidMenuItemKeyErrorStreamlitInvalidPageLayoutError!StreamlitInvalidSidebarStateErrorStreamlitInvalidURLError) ForwardMsg) PageConfig)gather_metrics)get_script_run_ctx)is_emojivalidate_material_icon)is_url) TypeGuardget helpr GET_HELP_KEY report a bugREPORT_A_BUG_KEYabout ABOUT_KEYr PageIcon)centeredwideLayout)autoexpanded collapsedInitialSideBarState)zGet helpzGet Helpr_GetHelp)z Report a bugr _ReportABug)Aboutr _AboutMenuKey MenuItemsu🔥™🎉🚀🌌💣✨🌙🎆🎇💥🤩🤙🌛🤘⬆💡🤪🥂⚡💨🌠🎊🍿😛🔮🤟🌃🍃🍾💫▪🌴🎈🎬🌀🎄😝☔⛽🍂💃😎🍸🎨🥳☀😍🅱🌞😻🌟😜💦💅🦄😋😉👻🍁🤤👯🌻‼🌈👌🎃💛😚🔫🙌👽🍬🌅☁🍷👭☕🌚💁👅🥰🍜😌🎥🕺❕🧡☄💕🍻✅🌸🚬🤓🍹®☺💪😙☘🤠✊🤗🍵🤞😂💯😏📻🎂💗💜🌊❣🌝😘💆🤑🌿🦋😈⛄🚿😊🌹🥴😽💋😭🖤🙆👐⚪💟☃🙈🍭💻🥀🚗🤧🍝💎💓🤝💄💖🔞⁉⏰🕊🎧☠♥🌳🏾🙉⭐💊🍳🌎🙊💸❤🔪😆🌾✈📚💀🏠✌🏃🌵🚨💂🤫🤭😗😄🍒👏🙃🖖💞😅🎅🍄🆓👉💩🔊🤷⌚👸😇🚮💏👳🏽💘💿💉👠🎼🎶🎤👗❄🔐🎵🤒🍰👓🏄🌲🎮🙂📈🚙📍😵🗣❗🌺🙄👄🚘🥺🌍🏡♦💍🌱👑👙☑👾🍩🥶📣🏼🤣☯👵🍫➡🎀😃✋🍞🙇😹🙏👼🐝⚫🎁🍪🔨🌼👆👀😳🌏📖👃🎸👧💇🔒💙😞⛅🏻🍴😼🗿🍗♠🦁✔🤖☮🐢🐎💤😀🍺😁😴📺☹😲👍🎭💚🍆🍋🔵🏁🔴🔔🧐👰☎🏆🤡🐠📲🙋📌🐬✍🔑📱💰🐱💧🎓🍕👟🐣👫🍑😸🍦👁🆗🎯📢🚶🦅🐧💢🏀🚫💑🐟🌽🏊🍟💝💲🐍🍥🐸☝♣👊⚓❌🐯🏈📰🌧👿🐳💷🐺📞🆒🍀🤐🚲🍔👹🙍🌷🙎🐥💵🔝📸⚠❓🎩✂🍼😑⬇⚾🍎💔🐔⚽💭🏌🐷🍍✖🍇📝🍊🐙👋🤔🥊🗽🐑🐘🐰💐🐴♀🐦🍓✏👂🏴👇🆘😡🏉👩💌😺✝🐼🐒🐶👺🖕👬🍉🐻🐾⬅⏬▶👮🍌♂🔸👶🐮👪⛳🐐🎾🐕👴🐨🐊🔹©🎣👦👣👨👈💬⭕📹📷 RANDOM_EMOJISc|jDcic]-\}}t|jj|/c}}Scc}}wN)itemsstrlowerstrip)dictkvs d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/commands/page_config.py_lower_clean_dict_keysr;;s826**, ?$!QCFLLN "A % ?? ?s2A cj|dk(r tSt|trt|rd|St|tr|j dr t |St|t r t|} t|tddddd S#t$rt|tr|cYSwxYw) aReturn the string to pass to the frontend to have it show the given PageIcon. If page_icon is a string that looks like an emoji (or an emoji shortcode), we return it as-is. Otherwise we use `image_to_url` to return a URL. (If `image_to_url` raises an error and page_icon is a string, return the unmodified page_icon string instead of re-raising the error.) randomzemoji:z :materialstretch)widthFRGBr&favicon) layout_configclampchannels output_formatimage_id) get_random_emoji isinstancer4r startswithrrrr Exception) page_icons r:_get_favicon_stringrL?sH!!)S!hy&9 {##)S!i&:&:;&G%i00)T" N  &     i %  s8BB20B2set_page_configct}|||j_|t||j_|dk(rt j }n5|dk(rt j}n|t j}n t|||j_ |dk(rt j}nK|dk(rt j}n5|dk(rt j}n|t j}n t|||j_|Bt#d t%|}t'||jj(} t+|| t-} | y| j/|y) u Configure the default settings of the page. This command can be called multiple times in a script run to dynamically change the page configuration. The calls are additive, with each successive call overriding only the parameters that are specified. Parameters ---------- page_title: str or None The page title, shown in the browser tab. If this is ``None`` (default), the page title is inherited from the previous call of ``st.set_page_config``. If this is ``None`` and no previous call exists, the page title is inferred from the page source. If a page source is a Python file, its inferred title is derived from the filename. If a page source is a callable object, its inferred title is derived from the callable's name. page_icon : Anything supported by st.image (except list), str, or None The page favicon. If ``page_icon`` is ``None`` (default), the page icon is inherited from the previous call of ``st.set_page_config``. If this is ``None`` and no previous call exists, the favicon is a monochrome Streamlit logo. In addition to the types supported by |st.image|_ (except list), the following strings are valid: - A single-character emoji. For example, you can set ``page_icon="🦈"``. - An emoji short code. For example, you can set ``page_icon=":shark:"``. For a list of all supported codes, see https://share.streamlit.io/streamlit/emoji-shortcodes. - The string literal, ``"random"``. You can set ``page_icon="random"`` to set a random emoji from the supported list above. - An icon from the Material Symbols library (rounded style) in the format ``":material/icon_name:"`` where "icon_name" is the name of the icon in snake case. For example, ``page_icon=":material/thumb_up:"`` will display the Thumb Up icon. Find additional icons in the `Material Symbols `_ font library. .. note:: Colors are not supported for Material icons. When you use a Material icon for favicon, it will be black, regardless of browser theme. .. |st.image| replace:: ``st.image`` .. _st.image: https://docs.streamlit.io/develop/api-reference/media/st.image layout: "centered", "wide", or None How the page content should be laid out. If this is ``None`` (default), the page layout is inherited from the previous call of ``st.set_page_config``. If this is ``None`` and no previous call exists, the page layout is ``"centered"``. ``"centered"`` constrains the elements into a centered column of fixed width. ``"wide"`` uses the entire screen. initial_sidebar_state: "auto", "expanded", "collapsed", or None How the sidebar should start out. If this is ``None`` (default), the sidebar state is inherited from the previous call of ``st.set_page_config``. If no previous call exists, the sidebar state is ``"auto"``. The folowing states are supported: - ``"auto"``: The sidebar is hidden on small devices and shown otherwise. - ``"expanded"``: The sidebar is shown initially. - ``"collapsed"``: The sidebar is hidden initially. In most cases, ``"auto"`` provides the best user experience across devices of different sizes. menu_items: dict Configure the menu that appears on the top-right side of this app. The keys in this dict denote the menu item to configure. The following keys can have string or ``None`` values: - "Get help": The URL this menu item should point to. - "Report a Bug": The URL this menu item should point to. - "About": A markdown string to show in the About dialog. A URL may also refer to an email address e.g. ``mailto:john@example.com``. If you do not include a key, its menu item will be hidden (unless it was set by a previous call to ``st.set_page_config``). To remove an item that was specified in a previous call to ``st.set_page_config``, set its value to ``None`` in the dictionary. Example ------- >>> import streamlit as st >>> >>> st.set_page_config( ... page_title="Ex-stream-ly Cool App", ... page_icon="🧊", ... layout="wide", ... initial_sidebar_state="expanded", ... menu_items={ ... 'Get Help': 'https://www.extremelycoolapp.com/help', ... 'Report a bug': "https://www.extremelycoolapp.com/bug", ... 'About': "# This is a header. This is an *extremely* cool app!" ... } ... ) Nr#r$)layoutr&r'r()initial_sidebar_stater/) ForwardProtopage_config_changedtitlerLrAPageConfigProtoCENTEREDWIDE LAYOUT_UNSETrrOAUTOEXPANDED COLLAPSED SIDEBAR_UNSETrrPr r;validate_menu_items menu_itemsset_menu_items_protorenqueue) page_titlerKrOrPr]msg pb_layoutpb_sidebar_statelowercase_menu_itemsmenu_items_protoctxs r:rMrMns[n .C(2%*=i*H'#,, 6 #(( #00 .V<<%.C"&*// * ,*33 + -*44  &*880"7  5EC1#K1G 1ST0122==13CD  C {KKc4tjtSr2)r=choicer0rgr:rGrGs == ''rgc t|vr|t|t|_nd|_t|vr|t|t|_nd|_t |vr-|t t|t xsd|_yd|_ yy)NT) r get_help_url hide_get_helprreport_a_bug_urlhide_report_a_bugr!rabout_section_mdclear_about_md)rdres r:r^r^s++  - 9,@,N  )-1  *//  0 1 =0DEU0V  -15  .((  * 606$Y/521  - /3  +)rgc|jD]A\}}t|s t|| t|dr-|tk7s7t |y)Nkey)httphttpsmailto)url)r3valid_menu_item_keyrrr!r)r]r8r9s r:r\r\7sR  "21"1%2q9 9 =q561 >*q1 1 2rgc(|ttthvSr2)rrr!rts r:rzrzAs rs# #FFH< FH9VB%  e (%( 5!C')'./ /!()H!IYI@A)A !?@ Y@,- -X{F:;;wd 23 93b u @,^!"!!% 8<#' ggg g6 g ! g  g#gT( 3#37P3 322>rg