<!DOCTYPE html>
<html lang="fr" class="no-js" ng-strict-di>
  <head>
    <meta charset="utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta
      name="viewport"
      content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"
    />

    <title ng-if="xgos.portal.title == undefined">
      KIS - Knowledge Information System
    </title>
    <title ng-if="xgos.portal.title != undefined">
      {{ xgos.portal.title }}
    </title>

    <link href="css/libcss/libcss.css" rel="stylesheet" />
    <link href="css/g2c_template.css" rel="stylesheet" />

    <link rel="icon" type="image/png" sizes="16x16" href="favicon.png" />


    <script
      src="js/XG/widgets/mapapp/operisconnect/js/AC_OETags.js"
      language="javascript"
    ></script>
    <script
      src="js/XG/widgets/mapapp/operisconnect/js/AppiaConnect.js"
      language="javascript"
    ></script>
  </head>

  <body class="{{xgos.sector=='supervision'?'admin':xgos.sector}}">
    <style>
      #elementProg {
        position: relative;
        top: 30%;
        left: 40%;
        width: 400px;
        height: 400px;
      }

      #myImage {
        position: absolute;
      }

      #loadingElement {
        position: absolute;
        top: 140px;
        left: -30px;
        width: 300px;
      }

      #myBar {
        position: absolute;
        width: 0%;
        height: 100%;
      }

      #textProgression {
        color: black;
      }

      #mydescription {
        position: absolute;
        top: 165px;
        left: -30px;
        width: 300px;
        font-family: Arial, serif, sans-serif;
        font-size: 10px;
      }
    </style>

    <div id="myProgress" class="myProgress">
      <div id="elementProg">
        <div id="myImage" class="col-md-12">
          <img src="img/patrimonio.png" />
        </div>
        <div id="loadingElement" class="progress col-md-12" style="padding: 0">
          <div
            id="myBar"
            class="progress-bar progress-bar-primary"
            role="progressbar"
            aria-valuemin="0"
            aria-valuemax="100"
          ></div>
        </div>
        <span id="mydescription" class="text-primary"></span>
      </div>
    </div>

    <script>
      window.kisLoadFullTime = 11000;
      window.kisLoadTime = 0;
      var myVar;
      var navigatorlg = window.navigator.language;
      if (localStorage.getItem('kisusertheme')) {
        const theme = localStorage.getItem('kisusertheme');
        const elemp = document.getElementById('myProgress');
        elemp.style.backgroundColor = theme === 'dark' ? '#323232' : 'white';
      }
      var alertFunc = function () {
        kisLoadTime += 100;
        var elem = document.getElementById('myBar');
        var progress = Math.round((kisLoadTime / kisLoadFullTime) * 100);
        if (kisLoadTime >= kisLoadFullTime) {
          elem.style.width = progress + '%';
          var myBar = document.getElementById('myBar');
          myBar.innerHTML = progress + '%';
          clearInterval(myVar);
          var elemp = document.getElementById('myProgress');
          elemp.parentNode.removeChild(elemp);
        } else {
          if (localStorage.getItem('current_language'))
            navigatorlg = localStorage.getItem('current_language');
          if (progress < 30) {
            var mydescription = document.getElementById('mydescription');
            switch (navigatorlg) {
              case 'fr':
                mydescription.innerHTML =
                  "Chargement de la configuration de l'application";
                break;
              default:
                mydescription.innerHTML = 'Loading configuration';
                break;
            }
          } else if (progress < 75) {
            var mydescription = document.getElementById('mydescription');
            switch (navigatorlg) {
              case 'fr':
                mydescription.innerHTML = 'Chargement des données';
                break;
              default:
                mydescription.innerHTML = 'Loading data';
                break;
            }
          } else if (progress < 95) {
            var mydescription = document.getElementById('mydescription');
            switch (navigatorlg) {
              case 'fr':
                mydescription.innerHTML = "Préparation de l'environnement";
                break;
              default:
                mydescription.innerHTML = 'Preparing the environment';
                break;
            }
          } else {
            var mydescription = document.getElementById('mydescription');
            switch (navigatorlg) {
              case 'fr':
                mydescription.innerHTML = 'Fin du chargement';
                break;
              default:
                mydescription.innerHTML = 'End of loading';
                break;
            }
          }
          elem.style.width = progress + '%';
          var myBar = document.getElementById('myBar');
          myBar.innerHTML = progress + '%';
        }
      };
      window.myVar = setInterval(alertFunc, 100);
    </script>
    <!-- Header -->
    <header
      id="xgos_nav"
      ng-show="xgos.user"
      ng-if="xgos.sector!='map'"
      class="navbar navbar-inverse navbar-fixed-top bs-docs-nav"
      role="banner"
      ng-cloak
    >
      <div
        ng-if="xgos.sector!=='indigau'"
        application-logo
        width="83"
        height="40"
      ></div>
      <div
        ng-if="xgos.sector==='hpo' || xgos.sector==='mapv2' || xgos.sector==='indigau'"
        class="hpo-shortcuts"
      >
        <img
          ng-if="xgos.sector==='hpo'"
          src="img/hpo/HPO.png"
          class="img-fluid text-center"
          alt="Responsive image"
          width="50"
        />
        <img
          ng-if="xgos.sector==='indigau'"
          src="img/indigau.png"
          class="img-fluid text-center"
          alt="Responsive image"
          width="70"
        />
        <span
          style="font-size:16px;padding-top:5px;"
          ng-style="{'margin-left': xgos.sector==='hpo' ? '10px' : '0px'}"
          class="label-info label btn reload-button-hpo"
          title="{{ 'hpo.common.reload' | translate }}"
          ng-click="initApplicationInformations()"
        >
          <i
            class="fa fa-refresh"
            style="margin-right: 10px; margin-top: 10px"
          ></i>
          {{ xgos.page | translate }}
        </span>
      </div>
      <div class="col-xs-4 alertSecurity"
        ng-if="(pwdComplexityNotValidated && showPwdComplexityMessage)
          || (httpsNotActivated && showHttpsMessage)">
        <div class="alertSecurityMsg">{{ 'message.alertSecurityMsg' | translate }}</div>
        <div class="alertSecurityAllMsg">{{ 'message.alertSecurityAllMsg' | translate }} (
          <span ng-if="httpsNotActivated && showHttpsMessage">{{ 'message.httpsNotActivated' | translate }}</span>
          <span ng-if="pwdComplexityNotValidated && showPwdComplexityMessage">
            <span ng-if="httpsNotActivated">, </span>{{ 'message.pwdComplexityNotValidated' | translate }}
          </span>)
        </div>
      </div>

      <div ng-if="xgos.licence.lastmonth" class="licence-warning">
        <span class="label label-{{ xgos.licence.color }}"
          >{{ xgos.licence.message }}</span
        >
      </div>

      <nav class="right_menu" role="navigation">
        <ul class="nav navbar-nav">
          <portal-switcher-avance
            ng-show="xgos.isroot || xgos.user.portails.length>0"
          ></portal-switcher-avance>

          <li class="portalName" ng-if="xgos.user && !xgos.isroot && xgos.user.portails.length==0">
            <a> {{ xgos.portal.name }} </a>
          </li>

          <li class="languageNav dropdown" ng-controller="LangCtrl">
            <!--<div id="language_editor" ng-click="toggleEditLanguageMode()"><i class="fa fa-key"> languages </i></div>-->
            <a
              data-animation="am-flip-x"
              data-html="1"
              data-placement="bottom-right"
              data-container=".languageNav"
              bs-dropdown="dropdown"
            >
              <i class="fa fa-globe" ng-if="!currentLanguage"></i>
              <i
                class="flag flag-{{currentLanguage}}"
                ng-if="currentLanguage"
              ></i>
              <span>{{ 'common.language' | translate }}</span>
            </a>
          </li>

          <li
            class="calendarMenuNav dropdown maindropdown"
            ng-class="{'open':calendar.visible}"
            ng-if="xgos.user && xgos.portal.parameters.calendar.active"
            ng-click="calendar.visible = !calendar.visible; appswitcher.visible = false; alert.visible = false; process.visible = false;"
          >
            <a href="">
              <i class="fa fa-calendar"></i>
            </a>
          </li>

          <li
            class="ProcessNav dropdown maindropdown"
            ng-class="{ 'open': process.visible }"
            ng-if="xgos.user && xgos.portal.parameters.process && xgos.portal.parameters.process.active"
            title="{{ 'portals.process.title' | translate }}"
            ng-click="process.visible = !process.visible;  appswitcher.visible = false; alert.visible = false; calendar.visible = false;changedProcessClick();"
          >
            <a href="">
              <i class="fa fa-tasks"></i>
            </a>
          </li>

          <li
            class="userMenuNav dropdown info-menu"
            ng-if="xgos.user"
            ng-controller="InfoCtrl"
          >
            <a
              data-animation="am-flip-x"
              data-html="1"
              data-placement="bottom-right"
              data-container=".userMenuNav"
              bs-dropdown="redirectActions"
            >
              <i class="fa fa-question-circle"></i>
            </a>
          </li>
          <li
            class="appSwitcherMenuNav dropdown maindropdown"
            ng-class="{'open':appswitcher.visible}"
            ng-if="xgos.user && (!xgos.portal ||  !xgos.portal.parameters || !xgos.portal.parameters.homepage || !xgos.portal.parameters.homepage.active)"
            ng-click="appswitcher.visible = !appswitcher.visible; calendar.visible = false;alert.visible=false;process.visible = false;"
          >
            <a href="">
              <i class="fa fa-home"></i>
            </a>
          </li>
          <li
            class="appSwitcherMenuNav dropdown maindropdown"
            ng-if="xgos.user && xgos.portal && xgos.portal.parameters && xgos.portal.parameters.homepage && xgos.portal.parameters.homepage.active"
            ng-click="goToHomepage(); calendar.visible = false;alert.visible=false;process.visible = false;"
          >
            <a href="">
              <i class="fa fa-home"></i>
            </a>
          </li>

          <!-- @TB DECOMMENTER POUR LA ROCHELLE -->
          <!-- <li class="resetMapDefaultCfg"
			ng-if="xgos.user"
			title="Réinitialiser la carte"
			ng-controller="QrCtrl"
			ng-click="forceReloadDefaultMapConfig()"
		    >
		    <a href="" >
			<i class="fa fa-arrows"></i>
		    </a>
		</li> -->

          <li
            class="userMenuNav dropdown"
            ng-controller="AuthCtrl"
            ng-show="xgos.user"
            ng-click="calendar.visible = false;alert.visible=false;appswitcher.visible=false;process.visible = false;"
          >
            <a
              data-animation="am-flip-x"
              data-html="1"
              data-placement="bottom-right"
              data-container=".userMenuNav"
              bs-dropdown="userActions"
            >
              <i class="fa fa-user"></i>
              <span class="username">{{xgos.user.name}}</span>
            </a>
          </li>

          <li class="scanqrcode" ng-controller="QrCtrl" ng-if="xgos.user">
            <a href="">
              <span
                class="glyphicon glyphicon-qrcode"
                aria-hidden="true"
                ng-click="barecode()"
              ></span>
            </a>
          </li>
        </ul>
      </nav>
      <main-navbar></main-navbar>
    </header>
    <!-- /Header -->

    <!-- Body -->

    <!-- Menu Menu -->
    <div
      id="xgos_side"
      class="xgos_side col-xs-2 col-md-2"
      ng-if="xgos.user && (xgos.sector=='admin' || xgos.sector=='supervision') && xgos.portal.parameters"
      ng-controller="NavigationCtrl"
      ng-cloak
    >
      <ul class="nav nav-sidebar">
        <li
          ng-class="{ 'active': isCurrentPath('/supervision/') }"
          class="category selectable"
          data-target="#"
          ng-if="xgos.isadmin"
          id="supervision"
        >
          <a href="#supervision">
            <span class="fa fa-cogs"></span>
            <span class="label"
              ><i class="fa fa-lock"></i
              ><translate>common.administrators</translate></span
            >
            <translate>Appname</translate>
          </a>
        </li>

        <div ng-show="xgos.portal">
          <div
            nav-group
            class="nav"
            groupinfos="rootNavigation"
            checkpath="isCurrentPath"
            ng-if="xgos.isroot"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="rightsNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="modelNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="processNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="toolsNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="applicationNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="mobileNavigation"
            checkpath="isCurrentPath"
          ></div>
          <div
            nav-group
            class="nav"
            groupinfos="licenceNavigation"
            checkpath="isCurrentPath"
          ></div>
        </div>
      </ul>
    </div>
    <!-- menu SIROCO + css -->
    <div ng-if="xgos.user && (xgos.sector=='siroco')">
      <div
        id="siroco_side"
        class="xgos_side col-xs-2 col-md-2"
        ng-controller="SirocoNavigationCtrl"
        ng-cloak
      >
        <ul class="nav nav-sidebar">
          <li
            ng-class="{ 'active': isCurrentPath('/siroco/') }"
            class="sub selectable"
            data-target="#siroco/"
          >
            <a href="#siroco/{{urlParameters}}">
              <i class="fa fa-home"></i>
              <translate>siroco.navigation.home.title</translate>
            </a>
          </li>

          <div ng-show="xgos.portal">
            <div
              nav-group
              class="nav"
              groupinfos="initNavigation"
              checkpath="isCurrentPath"
            ></div>
            <div
              nav-group
              class="nav"
              groupinfos="optimizationNavigation"
              checkpath="isCurrentPath"
            ></div>
            <div
              nav-group
              class="nav"
              groupinfos="exploitationNavigation"
              checkpath="isCurrentPath"
            ></div>
            <div
              nav-group
              class="nav"
              groupinfos="exportNavigation"
              checkpath="isCurrentPath"
            ></div>
          </div>
        </ul>
      </div>

      <link href="css/siroco.css" rel="stylesheet" />
    </div>

    <!-- menu formApp + css -->
    <div ng-if="xgos.user && (xgos.sector=='form')">
      <link href="css/formapp.css" rel="stylesheet" />
    </div>
    <!-- menu ancapp + css -->
    <div ng-if="xgos.user && (xgos.sector=='anc')">
      <anc-navigation></anc-navigation>
      <link href="css/application.css" rel="stylesheet" />
      <link href="css/anc.css" rel="stylesheet" />
    </div>
    <!-- menu bacapp + css -->
    <div ng-if="xgos.user && (xgos.sector=='bac')">
      <bac-navigation></bac-navigation>
      <link href="css/application.css" rel="stylesheet" />
      <link href="css/anc.css" rel="stylesheet" />
      <link href="css/bac.css" rel="stylesheet" />
    </div>

    <!-- /Menu menu -->

    <!-- Main -->
    <div
      id="xgos_main"
      ng-if="portalChosen || !userIsLoggedIn"
      class="col-xs-10 col-xs-offset-2 col-md-10 col-md-offset-2"
    >
      <div ng-view></div>
    </div>
    <!-- /Main -->

    <!-- /Body -->

    <!-- Alternative CSS -->
    <div
        id="alt-css-injector"
    >
      <!-- custom.css présent dans 'CSS-HTML' -->
      <!--
      <div id="custom-css-file">
        <style></style>
      </div>
      -->
    </div>
    <div
      ng-if="xgos.currentTheme && xgos.currentTheme!='default'"
    >
      <link
        ng-href="css/theme/{{xgos.currentTheme}}.css"
        rel="stylesheet"
      />
    </div>

    <!-- Client CSS -->
    <!-- @TB DECOMMENTER POUR LA ROCHELLE -->
    <!-- <link ng-href="css/clients/la_rochelle/custom.css" rel="stylesheet"/> -->

    <!-- PALR Client Custom Styling -->

    <!-- <link ng-href="css/clients/palr/custom.css" rel="stylesheet" /> -->

    <!-- End of PALR Client Custom Styling -->

    <script src="lib/dragula/dragula.3.7.2.js"></script>
    <script src="lib/palette/palette.js"></script>
    <script src="lib/opentype/opentype.min.js"></script>
    <script src="lib/signature_pad/signature_pad.js"></script>

    <script src="lib/codemirror/lib/codemirror.js"></script>
    <script src="lib/codemirror/mode/xml/xml.js"></script>

    <script src="lib/codemirror/mode/sql/matchbrackets.js"></script>
    <script src="lib/codemirror/mode/sql/show-hint.js"></script>
    <script src="lib/codemirror/mode/sql/sql-hint.js"></script>
    <script src="lib/codemirror/mode/sql/sql.js"></script>

    <link rel="stylesheet" href="lib/codemirror/mode/sql/show-hint.css" />

    <link rel="stylesheet" href="lib/codemirror/lib/codemirror.css" />

    <script src="lib/clipboardjs/clipboard.min.js"></script>
    <script src="lib/codemirror/mode/javascript/javascript.js"></script>

    <!-- do not edit those  @jenKins comments-->
    <!-- @jenkins_comment1 -->
    <script
      src="lib/requirejs/require.js?v=12"
      data-main="js/XG/main"
      async
    ></script>
    <!-- @jenkins_comment2 -->
    <!-- @jenkins_uncomment <script src="lib/requirejs/require.js"></script>
		<script async>
			require.config({
				paths: {
					"main": "js/XG/kis.min"
				}
			})
			require(["main"]);
		</script> @jenkins_uncomment -->

    <!--<script src="lib/requirejs/require.js?v=12" data-main="dist/js/global" async></script>-->
    <!--<script src="lib/requirejs/require.js" data-main="js/XG/main.min" async></script>-->
    <script type="text/javascript"></script>
    <div
      id="panelContainer"
      ng-show="xgos.sector=='map' || xgos.sector=='siroco' || xgos.sector=='bac' || xgos.sector=='form' || xgos.sector=='hpo' || xgos.sector=='indigau'"
    ></div>
    <div
      id="kis_calendar"
      class="full_screen_drop_down visible"
      ng-if="xgos.user && xgos.portal.parameters.calendar.active && calendar.visible"
    >
      <div class="wrapper">
        <kis-calendar
          show-add-event-button="true"
          display-filters="true"
          show-description="true"
        ></kis-calendar>
      </div>
    </div>

    <div
      id="kisProcess"
      class="full_screen_drop_down"
      ng-class="{ 'visible' : process.visible }"
      ng-if="xgos.user && xgos.portal.parameters.process && xgos.portal.parameters.process.active"
    >
      <div class="wrapper">
        <kis-process></kis-process>
      </div>
    </div>

    <div
      id="kis_app_switcher"
      class="full_screen_drop_down"
      ng-class="{'visible':appswitcher.visible}"
      ng-if="xgos.user"
    >
      <div class="wrapper">
        <home-app-switcher in-dropdown="true"></home-app-switcher>
      </div>
    </div>
  </body>
  <script language="JavaScript" type="text/javascript">
    function getUrlParameter(name) {
      name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
      var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(
        window.location.hash
      );
      return results === null
        ? ''
        : decodeURIComponent(results[1].replace(/\+/g, ' '));
    }

    if (getUrlParameter('operis') == 1) {
      var requiredMajorVersion = 9;
      var requiredMinorVersion = 0;
      var requiredRevision = 124;
      var hasProductInstall = DetectFlashVer(6, 0, 65);
      var hasRequestedVersion = DetectFlashVer(
        requiredMajorVersion,
        requiredMinorVersion,
        requiredRevision
      );

      if (hasProductInstall && !hasRequestedVersion) {
        // DO NOT MODIFY THE FOLLOWING FOUR LINES
        // Location visited after installation is complete if installation is required
        var MMPlayerType = isIE == true ? 'ActiveX' : 'PlugIn';
        var MMredirectURL = window.location;
        document.title =
          document.title.slice(0, 47) + ' - Flash Player Installation';
        var MMdoctitle = document.title;

        AC_FL_RunContent(
          'src',
          'playerProductInstall',
          'FlashVars',
          'MMredirectURL=' +
            MMredirectURL +
            '&MMplayerType=' +
            MMPlayerType +
            '&MMdoctitle=' +
            MMdoctitle +
            '',
          'width',
          '300',
          'height',
          '0',
          'align',
          'middle',
          'id',
          'AppiaConnect',
          'quality',
          'high',
          'bgcolor',
          '#869ca7',
          'name',
          'AppiaConnect',
          'allowScriptAccess',
          'always',
          'type',
          'application/x-shockwave-flash',
          'pluginspage',
          'http://www.adobe.com/go/getflashplayer'
        );
      } else if (hasRequestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        AC_FL_RunContent(
          'src',
          'AppiaConnect',
          'width',
          '300',
          'height',
          '0',
          'align',
          'middle',
          'id',
          'AppiaConnect',
          'quality',
          'high',
          'bgcolor',
          '#869ca7',
          'name',
          'AppiaConnect',
          'allowScriptAccess',
          'always',
          'type',
          'application/x-shockwave-flash',
          'pluginspage',
          'http://www.adobe.com/go/getflashplayer'
        );
      } else {
        // flash is too old or we can't detect the plugin
        var alternateContent =
          'Alternate HTML content should be placed here. ' +
          'This content requires the Adobe Flash Player. ' +
          '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
        document.write(alternateContent); // insert non-flash content
      }
      var apConnect = null;
      var OP_connect = 'AppiaConnect';

      /**
       * Récupération de l'objet AppiaConnect
       */
      function getAppiaConnect() {
        return getOperisConnect();
      }

      /**
       * Récupération de l'objet AppiaConnect
       */
      function getOperisConnect() {
        if (apConnect == null) {
          var oFlash = document.getElementById(OP_connect);
          apConnect = new JSAppiaConnect(oFlash);
        }
        //si pas trouvé
        if (apConnect == null) {
          alert('Impossible de trouver OperisConnect : ' + OP_connect + '.');
        }
        return apConnect;
      }
      /**
       * Le SIG préviens AppiaConnect qu'il est chargé
       *
       */
      function InitCanaux() {
        getAppiaConnect().InitCanaux();
      }

      /**
       * AppiaConnect demande son canal
       *
       */
      function AppiaConnectCanal() {
        getAppiaConnect().InitCanal();
      }
    }

    function LogEntrant(message) {
      if (typeof message == 'undefined') {
      } else {
        console.log('entrant:' + message);
        //pos();
      }
    }

    function logSortant(message) {
      if (typeof message == 'undefined') {
      } else {
        console.log('sortant:' + message);
        //pos();
      }
    }
    // -->
  </script>
  <noscript>
    <object
      classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      id="AppiaConnect"
      width="0"
      height="0"
      codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"
    >
      <param name="movie" value="AppiaConnect.swf" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#869ca7" />
      <param name="allowScriptAccess" value="always" />
      <embed
        src="AppiaConnect.swf"
        quality="high"
        bgcolor="#869ca7"
        width="0"
        height="0"
        name="AppiaConnect"
        align="middle"
        play="true"
        loop="false"
        quality="high"
        allowScriptAccess="always"
        type="application/x-shockwave-flash"
        pluginspage="http://www.adobe.com/go/getflashplayer"
      />
    </object>
  </noscript>
</html>
