<commit_before><template>
  <div v-if="showCard">
    <div class="w-100 myuw-border-top border-c7" />
    <uw-card :loaded="isReady"
             :errored="isErrored"
             :errored-show="showError"
    >
      <template #card-heading>
        <h2 class="h4 mb-3 text-dark-beige myuw-font-encode-sans">
          UW Medicine Account
        </h2>
        <img :src="staticUrl+'images/UWMedicine_Logo_RGB@2x.png'"
             width="100px"
             alt=""
             class="position-absolute"
        >
      </template>
      <template #card-error>
        An error occurred and MyUW cannot load your information right now.
        In the meantime, try the
        <a href="https://services.uwmedicine.org/passwordportal/login.htm"
        >UW Medicine Account</a> page.
      </template>
      <template #card-body>
        <p>
          This password is for UW Medicine applications
          like Epic, ORCA, MINDscape, AMC network, etc.
        </p>
        <div v-if="medPwExpired">
          <!--TODO: Maybe use a b-alert..?-->
          <b-alert show variant="danger">
            <p>
              Password expired on {{ toFriendlyDate(expiresMed) }}.
              <a v-out="'Change UW Medicine password'"
                 :href="passwordChange"
              >
                <br>Change your password to regain access.
              </a>
            </p>
          </b-alert>
        </div>
        <div v-else>
          <h3 class="h6 text-dark-beige myuw-font-encode-sans">
            Password expiration
          </h3>
          <div :class="expires30Days ? 'text-danger' : ''">
            <span>{{ toFriendlyDate(expiresMed) }}</span>
            <span>in {{ daysBeforeExpires }} days*</span>
          </div>
          <p>*Expiration date gets updated nightly.</p>
          <a :href="passwordChange">
            Change UW Medicine password
          </a>
        </div>
      </template>
    </uw-card>
  </div>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import Card from '../_templates/card.vue';

export default {
  components: {
    'uw-card': Card,
  },
  data: function() {
    return {
      passwordChange: 'https://services.uwmedicine.org/passwordportal/login.htm',<commit_msg>Apply card-status on uw medicine password expiration<commit_after><template>
  <div v-if="showCard">
    <div class="w-100 myuw-border-top border-c7" />
    <uw-card :loaded="isReady"
             :errored="isErrored"
             :errored-show="showError"
    >
      <template #card-heading>
        <h2 class="h4 mb-3 text-dark-beige myuw-font-encode-sans">
          UW Medicine Account
        </h2>
        <img :src="staticUrl+'images/UWMedicine_Logo_RGB@2x.png'"
             width="100px"
             alt=""
             class="position-absolute"
        >
      </template>
      <template #card-error>
        An error occurred and MyUW cannot load your information right now.
        In the meantime, try the
        <a href="https://services.uwmedicine.org/passwordportal/login.htm"
        >UW Medicine Account</a> page.
      </template>
      <template #card-body>
        <p>
          This password is for UW Medicine applications
          like Epic, ORCA, MINDscape, AMC network, etc.
        </p>
        <div v-if="medPwExpired">
          <!--TODO: Maybe use a b-alert..?-->
          <b-alert show variant="danger">
            <p>
              Password expired on {{ toFriendlyDate(expiresMed) }}.
              <a v-out="'Change UW Medicine password'"
                 :href="passwordChange"
              >
                <br>Change your password to regain access.
              </a>
            </p>
          </b-alert>
        </div>
        <div v-else>
          <uw-card-status>
            <template #status-label>
              Password expiration
            </template>
            <template #status-value>
              <div :class="expires30Days ? 'text-danger' : ''">
                {{ toFriendlyDate(expiresMed) }}
              </div>
            </template>
            <template #status-content>
              <div class="text-right">
                in {{ daysBeforeExpires }} days*
              </div>
            </template>
          </uw-card-status>
          <p class="text-muted myuw-text-md">
            *Expiration date gets updated nightly.
          </p>
          <a :href="passwordChange">
            Change UW Medicine password
          </a>
        </div>
      </template>
    </uw-card>
  </div>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import CardStatus from '../_templates/card-status.vue';
import Card from '../_templates/card.vue';

export default {
  components: {
    'uw-card': Card,
    'uw-card-status': CardStatus,
  },
  data: function() {
    return {
      passwordChange: 'https://services.uwmedicine.org/passwordportal/login.htm',
{'fraction_non_alphanumeric': 0.1341488277268094, 'fraction_numerical': 0.006320081549439347, 'mean_word_length': 1.730105731775181, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5008805', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1444, 'n_words': 342}