<?xml version="1.0" encoding="UTF-8"?>
<!--
  The Excel add-in manifest, version 2 (2026-10-03).

  WHY THE LITERAL DOMAIN AND THE LITERAL NAME ARE ALLOWED HERE. Everywhere in
  src/ the product name comes from env through lib/brand.ts and the API base
  from lib/config.ts, and scripts/check-brand.sh fails the build on a hardcoded
  one. This file is not in src/. Office reads it as a static document before
  any of our code runs, every URL in it must be absolute, and the display name
  is what appears in a person's ribbon. It is the same allowance
  .well-known/assetlinks.json already has for naming the Android package
  literally, and check-brand.sh scans public/ for the RETIRED brand only, for
  exactly this reason.

  WHAT VERSION 2 CHANGES, AND WHY EACH
  * The SHARED RUNTIME (Requirements SharedRuntime 1.1, Runtimes, and the
    functions' Page set to the task pane). Version 1 ran the custom functions
    in Office's separate JavaScript-only runtime, which has no
    Office.context.roamingSettings at all (that store is Outlook's), so the
    key the pane saved was never visible to a formula; and that runtime has
    no page origin on the desktop, so its requests to the API are
    cross-origin. In the shared runtime the functions and the pane are one
    page served from the site, its requests are same-origin, and the key is
    kept in OfficeRuntime.storage, which both read.
  * FunctionFile, which the desktop form factor requires and version 1 left
    out.
  * GetStarted, the callout Office shows once after installing.
  * The version, so Office re-reads every resource it caches by manifest.

  WHAT VERSION 2.1 CHANGES (2026-10-12), AND WHY
  * Nothing here, but the files it names now carry
    Access-Control-Allow-Origin (ADDIN_HEADERS in next.config.mjs). Excel on
    the web reads functions.json from its own origin, and without that header
    the browser refused it: the pane worked, the key was accepted, and not one
    function was ever registered, so =VS.METRIC never ran.
  * No <TaskpaneId> on the ribbon button: under a long-lived runtime it asks
    for a second pane outside the shared runtime (Microsoft's shared-runtime
    guidance).
  * functions.js and functions.json are named with ?v=2.1, so neither Office's
    cache of the metadata nor the edge's cache of the script can serve a copy
    with the old headers. scripts/check-addin.mjs holds all three.
  * 2.2 (2026-10-12, same day): the script and metadata URLs move to ?v=2.2
    because functions.js changed (a timeout now reads as a timeout, not as
    "could not be reached"), and the edge holds ?v=2.1 for four hours.
  * Icons at the sizes Microsoft's store validation asks for: 64x64 for
    HighResolutionIconUrl and 16, 32 and 80 on the ribbon, each its own file
    rather than a 32 or a 192 scaled by Office.

  SIDELOADED, NOT LISTED. This ships as a manifest a person points Excel at
  rather than as a store listing: a store submission is a review process and a
  support commitment of its own. Installing it is on the Excel add-in page in
  the app and on /excel.
-->
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">

  <Id>7f1c2a64-9d3e-4b58-93a1-0b6d5e4f2c10</Id>
  <Version>2.2.0.0</Version>
  <ProviderName>ValueScreener</ProviderName>
  <DefaultLocale>en-GB</DefaultLocale>
  <DisplayName DefaultValue="ValueScreener" />
  <Description DefaultValue="Filed US accounts in your own workbook: any figure, ten filed years, the statements as filed, peer tables, screens and your own book, each figure traceable to its filing." />
  <IconUrl DefaultValue="https://valuescreener.ai/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://valuescreener.ai/icon-64.png" />
  <SupportUrl DefaultValue="https://valuescreener.ai/excel" />

  <AppDomains>
    <AppDomain>https://valuescreener.ai</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Workbook" />
  </Hosts>

  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="SharedRuntime" MinVersion="1.1" />
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://valuescreener.ai/addin/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Workbook">
        <!--
          One runtime for the pane and the functions, kept alive while the
          workbook is open, so a formula never waits for a page to load and
          the pane can reach the functions' held answers.
        -->
        <Runtimes>
          <Runtime resid="Taskpane.Url" lifetime="long" />
        </Runtimes>
        <!--
          The custom functions. `Namespace` is what a person types before the
          dot: =VS.METRIC("AAPL","pe"). Short on purpose, because it is typed
          in every cell of a model.
        -->
        <AllFormFactors>
          <ExtensionPoint xsi:type="CustomFunctions">
            <Script>
              <SourceLocation resid="Functions.Script.Url" />
            </Script>
            <Page>
              <SourceLocation resid="Taskpane.Url" />
            </Page>
            <Metadata>
              <SourceLocation resid="Functions.Metadata.Url" />
            </Metadata>
            <Namespace resid="Functions.Namespace" />
          </ExtensionPoint>
        </AllFormFactors>

        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>
          <FunctionFile resid="Taskpane.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="vsGroup">
                <Label resid="Group.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16" />
                  <bt:Image size="32" resid="Icon.32" />
                  <bt:Image size="80" resid="Icon.80" />
                </Icon>
                <Control xsi:type="Button" id="vsOpenPane">
                  <Label resid="Pane.Label" />
                  <Supertip>
                    <Title resid="Pane.Label" />
                    <Description resid="Pane.Tip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://valuescreener.ai/icon-16.png" />
        <bt:Image id="Icon.32" DefaultValue="https://valuescreener.ai/icon-32.png" />
        <bt:Image id="Icon.80" DefaultValue="https://valuescreener.ai/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Functions.Script.Url" DefaultValue="https://valuescreener.ai/addin/functions.js?v=2.2" />
        <bt:Url id="Functions.Metadata.Url" DefaultValue="https://valuescreener.ai/addin/functions.json?v=2.2" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://valuescreener.ai/addin/taskpane.html" />
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://valuescreener.ai/excel" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Functions.Namespace" DefaultValue="VS" />
        <bt:String id="Group.Label" DefaultValue="ValueScreener" />
        <bt:String id="Pane.Label" DefaultValue="Figures and sources" />
        <bt:String id="GetStarted.Title" DefaultValue="Type =VS. in any cell" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Pane.Tip" DefaultValue="Your key, five templates, refresh all, and every function with an example." />
        <bt:String id="GetStarted.Description" DefaultValue="Open Figures and sources on the Home tab and paste the key from the Excel add-in page in the app. A figure we do not hold returns #N/A with the reason, never 0." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
