+
    )jvn                        R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
H
t
 ^ RIHtHtHtHtHtHtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ]! ]4      tRtRtR] R2tR R lt R t! ! R R]4      tR t]]"]! ^R7      3,          t# ! R R]4      t$ ! R R]4      t% ! R R]%4      t& ! R R]%4      t' ! R R]%4      t( ! R  R!]4      t) ! R" R#]4      t* ! R$ R%]4      t+R*R& lt,R*R' lt-R( t.]R)8X  d   ],! 4        ]-! 4        R# R# )+z,
Generate JSON schemas from pydantic models
N)cleandoc)	getLogger)Path)pprint)	AnnotatedAnyDictListLiteralOptionalUnion)	BaseModel)Field
ConfigDict)conlistz'http://json-schema.org/draft-07/schema#z1-1-3z#https://schemas.conda.org/menuinst-.schema.jsonc                0    V ^8  d   QhR\         R\         /# )   descriptionreturn)str)formats   "0lib/python3.14/site-packages/menuinst/_schema.py__annotate__r      s     	 	C 	C 	    c                    \         P                  ! R R\        V 4      4      p \        P                  P                  R4      '       dC   ^ RIpVP                  4       P                  V 4      pVP                  4       P                  V4      p V # )z(?<!\n)\n(?=\S) SPHINX_RUNNINGN)resubr   osenvironget
commonmarkParserparseReStructuredTextRendererrender)r   r$   asts   &  r   _clean_descriptionr*      si    &&+S(;2GHK	zz~~&''!''4 99;BB3Gr   c                 b    V P                  R 4      ;p'       d   \        V4      pWR &   WR&   R# R# )r   markdownDescriptionN)r#   r*   )schemar   s   & r   _patch_descriptionr.   *   s6    jj//{/(5 +}(3$% 0r   c                   @   a  ] tR t^1t o ]! R]R7      tV 3R ltRtV t	R# )r   forbidextrajson_schema_extrac                &   < V ^8  d   Qh/ S[ ;R&   # )r   model_configr   )r   __classdict__s   "r   r   BaseModel.__annotate__1   s     _ r    N)
__name__
__module____qualname____firstlineno__r   r.   r5   __annotate_func____static_attributes____classdictcell__r6   s   @r   r   r   1   s     )L^_L  r   r   c                      VP                  R 4      ;p'       d+   \        V4      VR &   VR ,          VP                  R/ 4      R&   \        V / VB # )r   r3   r,   )r#   r*   
setdefault_Field)argskwargsr   s   *, r   r   r   5   sT    jj//{/ 2; ?}LRS`La-r23HI4"6""r   
min_lengthc                   X   a  ] tR t^>t o Rt]! RRR7      t]! RRR7      tV 3R ltRt	V t
R# )MenuItemNameDictz
Variable menu item name.
Use this dictionary if the menu item name depends on installation parameters
such as the target environment.
Nz5Name when target environment is the base environment.r   z9Name when target environment is not the base environment.c                R   < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   # )r   target_environment_is_basetarget_environment_is_not_base)r   NonEmptyString)r   r6   s   "r   r   MenuItemNameDict.__annotate__>   s-      !) 8   %-^$<  r   r8   )r9   r:   r;   r<   __doc__r   rL   rM   r=   r>   r?   r@   s   @r   rI   rI   >   s;      <AL< @EP@"  r   rI   c                      a  ] tR t^Ot o Rt]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t	]! RRR7      t
]! RR	R7      t]! RR
R7      t]! RRR7      t]! RRR7      tV 3R ltRtV tR# )BasePlatformSpecificz
Same as `MenuItem`, but without `platforms`, and all is optional.

Note:
* This needs to be kept up-to-date with `MenuItem`!
* Default value is always `None`.
N
            The name of the menu item. Can be a dictionary if the name depends on
            installation parameters. See `MenuItemNameDict` for details.
            rJ   ?A longer description of the menu item. Shown on popup messages.5Path to the file representing or containing the icon.
            Command to run with the menu item, expressed as a
            list of strings where each string is an argument.
            }
            Working directory for the running process.
            Defaults to user directory on each platform.
            
            (Simple, preferrably single-line) logic to run before the command is run.
            Runs before the environment is activated, if that applies.
            zN(Simple, preferrably single-line) logic to run before the shortcut is created.DWhether to activate the target environment before running `command`.
            Whether run the program in a terminal/console or not.
            On Windows, it only has an effect if `activate` is true.
            On MacOS, the application will ignore command-line arguments.
            c                >  < V ^8  d   Qh/ S[ S[S[S[3,          ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[! S[^R7      ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R	&   S[ S[,          ;R
&   # )r   namer   iconrF   commandworking_dir
precommand	precreateactivateterminal)r   r   rN   rI   r   r   bool)r   r6   s   "r   r   !BasePlatformSpecific.__annotate__O   s      5)99:
;  $ # % , >
" - 4 gca01 5 F .) G X ( Y j ' k v tn w ~ tn 	 r   r8   )r9   r:   r;   r<   rP   r   r\   r   r]   r^   r_   r`   ra   rb   rc   r=   r>   r?   r@   s   @r   rR   rR   O   s      ?D?D "'V"K &+L&D 5:5G -2-K ,1,J +0`+I  %[ H  %	 H  r   rR   c                      a  ] tR t^t o Rt]! RRR7      t]! RRRR7      t]! RR	R7      t]! RR
R7      t	]! RRR7      t
]! RRR7      tV 3R ltRtV tR# )WindowszJWindows-specific instructions. You can override global keys here if neededTzDWhether to create a desktop icon in addition to the Start Menu item.rJ   Fzo
            DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.
            )r   
deprecatedNz
            Name of the Windows Terminal profile to create.
            This name must be unique across multiple installations because
            menuinst will overwrite Terminal profiles with the same name.
            z8URL protocols that will be associated with this program.z:File extensions that will be associated with this program.a  
            Identifier used in Windows 7 and above to associate processes, files and windows with a
            particular application. If your shortcut produces duplicated icons, you need to define
            this field. If not set, it will default to `Menuinst.<name>`.

            See [AppUserModelID docs](
            https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid)
            for more information on the required string format.
            c          	      P  < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[S[S[S[! RR7      3,          ,          ,          ;R&   S[ S[S[S[S[! RR7      3,          ,          ,          ;R&   S[ S[S[S[! R	^R
7      3,          ,          ;R&   # )r   desktopquicklaunchterminal_profilez\S+patternurl_protocolsz\.\S*file_extensionsz\S+\.\S+)rn   
max_lengthapp_user_model_id)r   rd   rN   r	   r   r   r   )r   r6   s   "r   r   Windows.__annotate__   s      d^   $    ~. 	! 4 D3f0E+E!FGH 5 < d9S%2I-I#JKL = D  	#u[UX/Y*Y Z[ E r   r8   )r9   r:   r;   r<   rP   r   rj   rk   rl   ro   rp   rr   r=   r>   r?   r@   s   @r   rg   rg      s     P#[G #( #K 27	2 LQOLM PUQPO _d_E  r   rg   c                   p  a  ] tR t^t o Rt]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t	]! RRR7      t
]! RR	R7      t]! RR
R7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      tV 3R ltRtV tR# )Linuxz
Linux-specific instructions.

Check the [Desktop entry specification](
https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html)
for more details.
Nz
            Categories in which the entry should be shown in a menu.
            See 'Registered categories' in the [Menu Spec](
            http://www.freedesktop.org/Standards/menu-spec).
            rJ   zk
            A boolean value specifying if D-Bus activation is supported for this application.
            z
            Generic name of the application; e.g. if the name is 'conda',
            this would be 'Package Manager'.
            z/Disable shortcut, signaling a missing resource.z
            List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec](
            https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).
            z?Additional terms to describe this shortcut to aid in searching.aI  
            The MIME type(s) supported by this application.
            Note this includes file types and URL protocols.
            For URL protocols, use `x-scheme-handler/your-protocol-here`.
            For example, if you want to register `menuinst:`, you would
            include `x-scheme-handler/menuinst`.
            z
            Do not show this item in the menu. Useful to associate MIME types
            and other registrations, without having an actual clickable item.
            Not to be confused with 'Hidden'.
            z
            Desktop environments that should NOT display this item.
            It'll check against `$XDG_CURRENT_DESKTOP`.
            z
            Desktop environments that should display this item.
            It'll check against `$XDG_CURRENT_DESKTOP`.
            zk
            Hint that the app prefers to be run on a more powerful discrete GPU if available.
            zX
            Do not show the 'New Window' option in the app's context menu.
            z
            Advanced. See [Startup Notification spec](
            https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).
            z
            Filename or absolute path to an executable file on disk used to
            determine if the program is actually installed and can be run. If the test
            fails, the shortcut might be ignored / hidden.
            z
            Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`).
            Only needed if you define custom MIME types in `MimeType`.
            c          
        < V ^8  d   Qh/ S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R	&   S[ S[,          ;R
&   S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[S[S[,          S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[S[S[S[S[! RR7      3,          3,          ,          ;R&   # )r   z^.+;$rm   
CategoriesDBusActivatableGenericNameHidden
ImplementsKeywordsMimeType	NoDisplay	NotShowIn
OnlyShowInPrefersNonDefaultGPUSingleMainWindowStartupNotifyStartupWMClassTryExecz.*\*.*glob_patterns)r   r   r	   r   r   r   rd   r   )r   r6   s   "r   r   Linux.__annotate__   s     tCy)Cx9P4P*QQRS 	 & d^ ' 6 # 7 H TN I P tCy)Cx9P4P*QQRS Q b uT#Y	#uX7N2N(OOPQ c j uT#Y	#uX7N2N(OOPQ k B ~ 	C V d3i3h8O3O)PPQR W h tCy)Cx9P4P*QQRS i z #4. { J tn K Z D> [ l SM m ~ c] 	 R DiU95M0M&N!NOP S r   r8   )r9   r:   r;   r<   rP   r   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r=   r>   r?   r@   s   @r   ru   ru      se     W\	WJ ','O "'"K #FF W\WJ UZVUH UZUH !&	!I V[VI W\WJ ,1, (-( %*%M %*%N #	G TYTMS  r   ru   c                   R  a  ] tR tRt o Rt ! R R]4      t ! R R]4      t ! R R]4      t]	! R	R
R7      t
]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	RR7      t]	! R	R R7      t]	! R	R!R7      t ]	! R	R"R7      t!V 3R# lt"R$t#V t$R	# )%MacOSi`  a  
Mac-specific instructions. Check these URLs for more info:

- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html)
- `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html)
- `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)
c                      a  ] tR tRt o Rt]! RRR7      t]! RRR7      t]! RRR7      t]! RR	R7      t	V 3R
 lt
RtV tR# )MacOS.CFBundleURLTypesModelii  z/Describes a URL scheme associated with the app.Nz:This key specifies the app's role with respect to the URL.rJ   .z=URL schemes / protocols handled by this type (e.g. 'mailto').z8Abstract name for this URL type. Uniqueness recommended.8Name of the icon image file (minus the .icns extension).c                   < V ^8  d   Qh/ S[ S[R,          ,          ;R&   S[S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   CFBundleTypeRoleCFBundleURLSchemesCFBundleURLNameCFBundleURLIconFileEditorViewerShellNone)r   r
   r	   r   )r   r6   s   "r   r   (MacOS.CFBundleURLTypesModel.__annotate__i  sX      #7+N#OP 	
  !I 	
  "# 	
  &c] 	
 r   r8   )r9   r:   r;   r<   rP   r   r   r   r   r   r=   r>   r?   r@   s   @r   CFBundleURLTypesModelr   i  sY     9SXUT
 ).X)
 */S*
 .3S.
  r   r   c                      a  ] tR tRt o Rt]! RRR7      t]! RRR7      t]! RRR7      t]! RR	R7      t	]! RR
R7      t
V 3R ltRtV tR# ) MacOS.CFBundleDocumentTypesModeli}  z2Describes a document type associated with the app.Nr   rJ   .z=Abstract name for this document type. Uniqueness recommended.z;This key specifies the app's role with respect to the type.a  
                List of UTI strings defining a supported file type; e.g. for PNG files, use
                'public.png'. See [UTI Reference](
                https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html)
                for more info about the system-defined UTIs. Custom UTIs can be defined via
                'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to
                be imported via 'UTImportedTypeDeclarations'.

                See [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more
                info.
                z
                Determines how Launch Services ranks this app among the apps
                that declare themselves editors or viewers of files of this type.
                c                   < V ^8  d   Qh/ S[ S[,          ;R&   S[;R&   S[ S[R,          ,          ;R&   S[S[,          ;R&   S[R,          ;R&   # )r   CFBundleTypeIconFileCFBundleTypeNamer   LSItemContentTypesLSHandlerRankr   )OwnerDefault	Alternate)r   r   r
   r	   )r   r6   s   "r   r   -MacOS.CFBundleDocumentTypesModel.__annotate__}  si      'sm 	
   	
  #7+N#OP 	
  !I 	
 < >? 	
= r   r8   )r9   r:   r;   r<   rP   r   r   r   r   r   r   r=   r>   r?   r@   s   @r   CFBundleDocumentTypesModelr   }  su     <.3S/
 !&X!
 TY\T
 ).
)
  CHC
=  r   r   c                      a  ] tR tRt o ]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RR	R7      t	]! RR
R7      t
V 3R ltRtV tR# )MacOS.UTTypeDeclarationModeli  .z=The Uniform Type Identifier types that this type conforms to.rJ   NzA description for this type.z5The bundle icon resource to associate with this type.z3The Uniform Type Identifier to assign to this type.z>The webpage for a reference document that describes this type.z>A dictionary defining one or more equivalent type identifiers.c                   < V ^8  d   Qh/ S[ S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[;R&   S[S[,          ;R&   S[S[S[ S[,          3,          ;R&   # )r   UTTypeConformsToUTTypeDescriptionUTTypeIconFileUTTypeIdentifierUTTypeReferenceURLUTTypeTagSpecification)r	   r   r   r   )r   r6   s   "r   r   )MacOS.UTTypeDeclarationModel.__annotate__  sz     s) 	
 
 $C= 	
  ! 	
   	
 " %SM 	
# * !%S$s)^ 4 	
+ r   r8   )r9   r:   r;   r<   r   r   r   r   r   r   r   r=   r>   r?   r@   s   @r   UTTypeDeclarationModelr     s{     &+X'
 ,17,
 ).P)
 !&N!
 -2Y-
 8=Y8
+  r   r   Nz
            Display name of the bundle, visible to users and used by Siri. If
            not provided, 'menuinst' will use the 'name' field.
            rJ   z
            Unique identifier for the shortcut. Typically uses a reverse-DNS format.
            If not provided, 'menuinst' will generate one from the 'name' field.
            z
            Short name of the bundle. May be used if `CFBundleDisplayName` is
            absent. If not provided, 'menuinst' will generate one from the 'name' field.
            z
            Suitable replacement for text-to-speech operations on the app.
            For example, 'my app one two three' instead of 'MyApp123'.
            z
            Build version number for the bundle. In the context of 'menuinst'
            this can be used to signal a new version of the menu item for the same
            application version.
            z
            URL types supported by this app. Requires macOS 10.14.4 or above.
            Refer to `event_handler` if your application does not have support
            for Apple Events handling.
            z
            Document types supported by this app. Requires macOS 10.14.4 or above.
            Refer to `event_handler` if your application does not have support
            for Apple Events handling.
            zKThe App Store uses this string to determine the appropriate categorization.z7Specifies whether this app runs only in the background.z=List of key-value pairs used to define environment variables.z
            Minimum version of macOS required for this app to run, as `x.y.z`.
            For example, for macOS v10.4 and later, use `10.4.0`.
            zm
            Whether an app is prohibited from running simultaneously in multiple user sessions.
            z
            If true, prevent a universal binary from being run under
            Rosetta emulation on an Intel-based Mac.
            zMA message describing why an app is requesting access to capture system audio.zLA message describing why an app is requesting access to the device's camera.zQA message describing why an app is requesting access to the device's main camera.zPA message describing why an app is requesting access to the device's microphone.z<If true, allows an OpenGL app to utilize the integrated GPU.z;The uniform type identifiers owned and exported by the app.zMThe uniform type identifiers inherently supported, but not owned, by the app.z
            List of permissions to request for the launched application. See [the entitlements docs](
            https://developer.apple.com/documentation/bundleresources/entitlements) for a full
            list of possible values.
            z
                Set of extra properties for the Info.plist file.
                These properties are not validated by `menuinst.`
                a  
                Paths that should be symlinked into the shortcut app bundle.
                It takes a mapping of source to destination paths. Destination paths must be
                relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.
                a  
            Required shell script logic to handle opened URL payloads.
            Note this feature requires macOS 10.14.4 or above.
            Using this key will inject a custom Swift launcher in the `.app` bundle
            to listen to Apple Events and forward them to your application.
            If your app is already handling Apple Events (e.g. via Qt's
            `QFileOpenEvent`), you do not need this.
            c          
      H  < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[S[S[! RR7      3,          ,          ;R&   S[ S[S[S[! ^R7      3,          ,          ;R&   S[ S[,          ;R&   S[ S[S[S[! RR7      3,          ,          ;R	&   S[ S[S[,          ,          ;R
&   S[ S[S[,          ,          ;R&   S[ S[S[S[! RR7      3,          ,          ;R&   S[ S[,          ;R&   S[ S[S[S[3,          ,          ;R&   S[ S[S[S[! RR7      3,          ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[S[	,          ,          ;R&   S[ S[S[	,          ,          ;R&   S[ S[S[S[S[! RR7      3,          ,          ,          ;R&   S[ S[S[
S[3,          ,          ;R&   S[ S[S[
S[S[S[! RR7      3,          3,          ,          ;R&   S[ S[
,          ;R &   # )!r   CFBundleDisplayNamez^[A-z0-9\-\.]+$rm   CFBundleIdentifier)rq   CFBundleNameCFBundleSpokenNamez^\S+$CFBundleVersionCFBundleURLTypesCFBundleDocumentTypesz^public\.app-category\.\S+$LSApplicationCategoryTypeLSBackgroundOnlyLSEnvironmentz^\d+\.\d+\.\d+$LSMinimumSystemVersionLSMultipleInstancesProhibitedLSRequiresNativeExecutionNSAudioCaptureUsageDescriptionNSCameraUsageDescriptionNSMainCameraUsageDescriptionNSMicrophoneUsageDescription$NSSupportsAutomaticGraphicsSwitchingUTExportedTypeDeclarationsUTImportedTypeDeclarationsz[a-z0-9\.\-]+entitlementsinfo_plist_extraz^[^/]+.*link_in_bundleevent_handler)r   r   r   r   r	   r   r   rd   r   r   rN   r   )r   r6   s   "r   r   MacOS.__annotate__`  s    ~ "#  P !3>P0Q+Q!RS Q b 9S%2*>%>?@ c t ! u F iU8-D(DEF 	G Z t$9:; 	[ n $D)C$DE 	o B  (	#uEc7d2d(ef C N tn O V DcN+ W ^ %YsEBT4U/U%VW _ p $,D> q @  (~ A R %-SM S ^ 'sm _ j #+3- k v #+3- w B +34. C J !).D)E F K R !).D)E F S ^ 4	#u=M/N*N OPQ 	_ r tNC$789 
s H T.)C{A[<[2\"\]^ I ` N+ a r   r8   )%r9   r:   r;   r<   rP   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r=   r>   r?   r@   s   @r   r   r   `  s7    
	 
(&
Y &
P
 
4 */* W\W DIDL ).) JO	JO ?D	? IN	I joYj (-N( /4T/M [`[ 5:5! 161 5:[5" /4Z/ 38_3  38^3  <AS<( JORJ JO[J UZ	UL 		
  			
  /4/Ma  r   r   c                   l   a  ] tR tRt o Rt]! RRR7      t]! RRR7      t]! RRR7      tV 3R lt	R	t
V tR# )
	Platformsi  z
Platform specific options.

Note each of these fields supports the same keys as the top-level `MenuItem`
(sans `platforms` itself), in case overrides are needed.
Nz1Options for Linux. See `Linux` model for details.rJ   z1Options for macOS. See `MacOS` model for details.z5Options for Windows. See `Windows` model for details.c                n   < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   linuxosxwin)r   ru   r   rg   )r   r6   s   "r   r   Platforms.__annotate__  s?      E?   
%    
'	 ! r   r8   )r9   r:   r;   r<   rP   r   r   r   r   r=   r>   r?   r@   s   @r   r   r     sG      #HE !HC #LC!  r   r   c                      a  ] tR tRt o Rt]! RRR7      t]! RRR7      t]! RRR7      t]! RR	R7      t	]! RR
R7      t
]! RRR7      t]! RRR7      t]! RRR7      t]! RRR7      t]! RR7      tV 3R ltRtV tR# )MenuItemi  z<Instructions to create a menu item across operating systems..rS   rJ   rT   rV   NrU   rX   zh
            (Simple, preferrably single-line) logic to run before the shortcut is created.
            rW   TrY   FrZ   z
            Platform-specific options. Presence of a platform field enables
            menu items in that platform.
            c                  < V ^8  d   Qh/ S[ S[S[3,          ;R&   S[;R&   S[! S[^R7      ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R	&   S[S[,          ;R
&   S[;R&   # )r   r\   r   rF   r^   r]   r`   ra   r_   rb   rc   	platforms)r   rN   rI   r   r   r   rd   r   )r   r6   s   "r   r   MenuItem.__annotate__  s       00
1       SQ' ! 2 >
" 3 : ( ; L ' M \ .) ] n tn o v tn 	w J  K r   r8   )r9   r:   r;   r<   rP   r   r\   r   r^   r]   r`   ra   r_   rb   rc   r   r=   r>   r?   r@   s   @r   r   r     s     B495D VK +0+G &+L&D ,1,J +0+I -2-K  %[ H  %	 H !IK  r   r   c            	          a  ] tR tRt o Rt]! RR]R]R]/R7      t	]
! ]RRR	R
7      t]
! ]RRR7      t]
! RRR7      t]
! RRR7      tV 3R ltRtV tR# )MenuInstSchemai  zPMetadata required to create menu items across operating systems with `menuinst`.r0   $schemaz$idz$versionr1   zDEPRECATED. Use ``$schema``.T)r   aliasrh   z3Version of the menuinst schema to validate against.)r   r   .zEName for the category containing the items specified in `menu_items`.rJ   z;List of menu entries to create across main desktop systems.c                h   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[! S[^R7      ;R&   # )r   r5   id_schema_	menu_namerF   
menu_items)r   rN   r   r   )r   r6   s   "r   r   MenuInstSchema.__annotate__  sW         
  $  % .  / 6 Q/ 7 r   r8   N)r9   r:   r;   r<   rP   r   SCHEMA_DIALECT
SCHEMA_URLSCHEMA_VERSIONr5   r   r   r   r   r   r=   r>   r?   r@   s   @r   r   r     s     V)~:
 L  2	C $IG
 !&\!I 38R3J7  r   r   c                    \         P                  4       pV '       d   \        \        4      P                  p\
        P                  ! V^R7      p\        V4       \        VR,          R\         R2,          R4      ;_uu_ 4       pVP                  V4       VP                  R4       RRR4       V# V#   + '       g   i     T# ; i)r   indentdata	menuinst-r   w
N)r   model_json_schemar   __file__parentjsondumpsprintopenr   write)r   r-   here
schema_strfs   &    r   dump_schema_to_jsonr     s    --/FH~$$ZZq1
j$-In-=\"JJCPPTUGGJGGDM Q M6M QP Ms   #B22C	c                 l   \        \        4      P                  p\        R R R .R\	        4       P                  4       R\        4       P                  4       R\        4       P                  4       /R7      p\        R V.R7      P                  4       p\        VR&   VP                  RR4       VP                  R	R4       VR
,          ^ ,          R,          P                  4        FK  p\        VP                  4       4       F+  pV\        P                  9   g   K  VP                  V4       K-  	  KM  	  V '       dj   \        V4       \!        VR,          R\"         R2,          R4      ;_uu_ 4       p\$        P&                  ! W6^R7       VP)                  R4       RRR4       V# V#   + '       g   i     T# ; i)REQUIREDr   r   r   )r\   r   r^   r   )r   r   r   r   Nr   r   r   r   r   z.default.jsonr   r   r   )r   r   r   r   rg   
model_dumpr   ru   r   r   popvalueslistkeysmodel_fieldsr   r   r   r   dumpr   )r   r   default_itemdefaultplatform_valuekeyr   s   &      r   dump_default_to_jsonr    s[   >  D79'')57%%'UW'')
		L z|nMXXZG#GIKKtKK	4 !,/2;?FFH++-.Ch+++""3' / I w$-In-=]"KKSQQUVIIg+GGDM R N7N RQ Ns   ,*F""F3	c                     \        V \        \        34      '       d4   \        V 4      ;_uu_ 4       p\        P
                  ! V4      pR R R 4       MT p\        R/ XB #   + '       g   i     L; i)Nr8   )
isinstancer   r   r   r   loadr   )metadata_or_pathr   metadatas   &  r   validater	  ,  sU    "S$K00"##qyy|H $# $%H%%	 $#s   AA-	__main__)T)/rP   r   r!   r   inspectr   loggingr   pathlibr   r   typingr   r   r   r	   r
   r   r   pydanticr   
_BaseModelr   rC   r   pydantic.typesr   r9   logr   r   r   r*   r.   r   rN   rI   rR   rg   ru   r   r   r   r   r   r  r	  r8   r   r   <module>r     s)    	 	     G G G , $  " :2>2B,O
	4`
 `# 3 334y "H9 HV/" /dQ  Qh\  \~	 ,Ly L\Y B	8& z r   