<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  PRODUCTION manifest — points at the Azure-hosted add-in, not localhost.
  The dev manifest (manifest/manifest.xml) is unchanged and still used for local
  testing. This file is the one to sideload for a hosted test and, later, to
  submit to Partner Center / AppSource.

  Host URL: https://orange-beach-075271110.7.azurestaticapps.net  (Azure Static
  Web App; the customer never sees this auto-generated name). If a custom domain
  (e.g. addin.definitionintelligence.com) is bound later, replace every
  occurrence of the azurestaticapps.net host below with it.

  Production add-in Id is DISTINCT from the dev Id so both can be installed side
  by side without colliding.
-->
<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>4ab48e70-5153-437d-8f2b-faf10c5b6bde</Id>
  <Version>4.0.0.0</Version>
  <ProviderName>Definition Intelligence LLC</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>

  <DisplayName DefaultValue="Definition Intelligence" />
  <Description DefaultValue="Instantly look up any defined term, Section, Exhibit, or Schedule in a contract — without leaving your place. Your document never leaves your computer." />

  <IconUrl DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/assets/icons/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/assets/icons/icon-80.png" />
  <SupportUrl DefaultValue="https://definitionintelligence.com/support" />

  <!--
    AppDomains — every external origin the add-in navigates to (sign-in dialogs,
    the Stripe checkout dialog) MUST be listed or Word blocks the window.
      • the Azure host          — the add-in itself + /.auth + /api
      • checkout.stripe.com     — the payment dialog (Step 3d)
      • login.microsoftonline.com / accounts.google.com / appleid.apple.com
                                — the provider sign-in dialogs (Step 3c)
  -->
  <AppDomains>
    <AppDomain>https://orange-beach-075271110.7.azurestaticapps.net</AppDomain>
    <AppDomain>https://checkout.stripe.com</AppDomain>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
    <AppDomain>https://accounts.google.com</AppDomain>
    <AppDomain>https://appleid.apple.com</AppDomain>
  </AppDomains>

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

  <DefaultSettings>
    <SourceLocation DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>

          <FunctionFile resid="Commands.Url" />

          <!-- ══════════════════════════════════════════════
               RIBBON — Home Tab
          ══════════════════════════════════════════════ -->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="CommandsGroup">
                <Label resid="CommandsGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>

                <!-- Open Definitions Panel -->
                <Control xsi:type="Button" id="TaskpaneButton">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <!-- ══════════════════════════════════════════════
               RIGHT-CLICK CONTEXT MENU
          ══════════════════════════════════════════════ -->
          <ExtensionPoint xsi:type="ContextMenu">
            <OfficeMenu id="ContextMenuText">
              <Control xsi:type="Button" id="ShowDefinitionButton">
                <Label resid="ShowDefinition.Label" />
                <Supertip>
                  <Title resid="ShowDefinition.Label" />
                  <Description resid="ShowDefinition.Tooltip" />
                </Supertip>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>
                <Action xsi:type="ShowTaskpane">
                  <TaskpaneId>ButtonId1</TaskpaneId>
                  <SourceLocation resid="Taskpane.Url" />
                </Action>
              </Control>
            </OfficeMenu>
          </ExtensionPoint>

        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/assets/icons/icon-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/assets/icons/icon-32.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/assets/icons/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://definitionintelligence.com" />
        <bt:Url id="Commands.Url" DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://orange-beach-075271110.7.azurestaticapps.net/taskpane.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GetStarted.Title" DefaultValue="Definition Intelligence" />
        <bt:String id="CommandsGroup.Label" DefaultValue="Definition Intelligence" />
        <bt:String id="TaskpaneButton.Label" DefaultValue="Definitions" />
        <bt:String id="AnalyzeButton.Label" DefaultValue="Analyze Document" />
        <bt:String id="ShowDefinition.Label" DefaultValue="Show Definition" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="GetStarted.Description" DefaultValue="Double-click any defined term, Section, Exhibit, or Schedule to see its text in the task pane." />
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open the Definition Intelligence task pane." />
        <bt:String id="AnalyzeButton.Tooltip" DefaultValue="Scan the document and extract all defined terms." />
        <bt:String id="ShowDefinition.Tooltip" DefaultValue="Show the definition of the term at the cursor position, including nested and cross-referenced definitions." />
      </bt:LongStrings>
    </Resources>

    <!-- OFFICE SINGLE SIGN-ON (2026-08-23). Word already knows who the user is;
         this block lets the add-in ask Office for a token instead of opening a
         sign-in popup. THE POPUP ROUTE WAS TRIED AND FAILS INSIDE WORD - Azure's
         cookie-and-redirect handshake does not survive the task pane and dialog
         being separate webviews. It works in a browser, which is what made the
         failure confusing.

         The Resource URI and Id must match the app registration exactly, and the
         Office client ids are pre-authorised on that registration - that is what
         makes the token arrive with no prompt at all.

         ⚠ BOTH VALUES CARRY THE AZURE HOSTNAME. When definitionintelligence.com
         is pointed at this site, the identifier URI on the registration and this
         block have to change together. -->
    <WebApplicationInfo>
      <Id>d35622fa-2106-47e1-9d90-e3196078f98d</Id>
      <Resource>api://orange-beach-075271110.7.azurestaticapps.net/d35622fa-2106-47e1-9d90-e3196078f98d</Resource>
      <Scopes>
        <Scope>openid</Scope>
        <Scope>profile</Scope>
        <Scope>email</Scope>
      </Scopes>
    </WebApplicationInfo>
  </VersionOverrides>

</OfficeApp>
