PageSourceSearch

https://movabletype.net/.shared/dist/chunk/771.d858bac86d639bde1bc6.js

js movabletype.net collected 2026-10-03 19:36:39 UTC 58,806 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkimmovabletype=self.webpackChunkimmovabletype||[]).push([[7,678,771,1470,1717,2794,2857,3010,3334,3836,3911,4107,5232,5643,5815,6034,6179,6728,7286,7581,7591,8009,8068,8430,8722,9377,9756],{3010:function(e,n){const l={fragment:{argumentDefinitions:a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],kind:"Fragment",metadata:null,name:"UpdateWatchersMutation",selections:[{alias:null,args:t=[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Approval",kind:"LinkedField",name:"updateWatchers",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:[s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"UpdateWatchersMutation",selections:[{alias:null,args:t,concreteType:"Approval",kind:"LinkedField",name:"updateWatchers",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},s],storageKey:null},s],storageKey:null}]},params:{cacheID:"8d6982a0a82390d5d8eb335f15d4c212",id:null,metadata:{},name:"UpdateWatchersMutation",operationKind:"mutation",text:"mutation UpdateWatchersMutation(\n  $input: UpdateWatchersInput!\n) {\n  updateWatchers(input: $input) {\n    watchers {\n      __typename\n      id\n    }\n    id\n  }\n}\n"}};var a,t,s;l.hash="a4baa7d56d957a0cfc543ed92754f1e0",n.default=l},5815:function(e,n,l){var a=l(3010),t=l(18312),s=l(91470);let i=a.default;"default"in i&&(i=i.default),n.default={commit:function({environment:e,reload:n,approval:l,preview:a,watchers:r}){let o="";if("operation"in i){const e=i.operation.selections[0];"name"in e&&(o=e.name)}return new Promise((u,d)=>{(0,t.commitMutation)(e,{mutation:i,variables:{input:{approvalId:l?.id||"",previewId:a.id,watcherIds:r?r.map(e=>e.id):void 0}},onCompleted:(0,s.default)({resolve:u,reject:d,reload:n}),updater:e=>{const n=e.getRootField(o);if(!n)return;const l=e.get(a.id)?.getLinkedRecord("approval"),t=n.getLinkedRecords("watchers");if(t){const n=[];t.forEach(l=>{const a=l.getValue("id");"string"==typeof a&&n.push(e.get(a))}),l?.setLinkedRecords(n,"watchers")}},optimisticUpdater:e=>{const n=e.get(a.id)?.getLinkedRecord("approval");n?.setLinkedRecords(r?.map(n=>e.get(n.id)),"watchers")}})})}}}
1,6728:function(e,n){n.default=class{constructor({setFragment:e}){this.setFragment=void 0,this.fragments=void 0,this.setFragment=e,this.fragments=[""]}init({fragments:e}){this.fragments=e}last(){return this.fragments[this.fragments.length-1]||""}push({fragment:e}){this.fragments.push(e),this.setFragment({fragment:e})}pop(){this.fragments.pop(),0===this.fragments.length&&(this.fragments=[""]),this.setFragment({fragment:this.last()})}isEmpty(){return 1===this.fragments.length&&""===this.fragments[0]}}},13334:function(e,n,l){var a=l(23911),t=(l(18312),l(77286)),s=l(80678);let i=a.default;"default"in i&&(i=i.default),n.default={commit:(0,t.default)({mutation:i,commentStatus:s.N4})}},15232:function(e,n){const l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"App_workflow",selections:[a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[t={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],type:"Workflow",abstractKey:null};var a,t;l.hash="9adb3b8626ed81b71fcb32e69e1f3fd8",n.default=l},15643:function(e,n){const l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"App_preview",selections:[a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"canEditEntry",storageKey:null},{alias:null,args:null,concreteType:"Blog",kind:"LinkedField",name:"blog",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"language",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timeZone",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Entry",kind:"LinkedField",name:"entry",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"isPost",storageKey:null},{alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"currentVersion",plural:!1,selections:t=[a],storageKey:null},{alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"upcomingVersion",plural:!1,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"workflowCount",storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"selectableWorkflows",plural:!0,selections:o=[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[r={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:i=[a,s={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Approval",kind:"LinkedField",name:"approval",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"startedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"approvedAt",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:t,storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"startedBy",plural:!1,selections:i,storageKey:null},{alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"initialEntryVersion",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:o,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[{kind:"InlineFragment",selections:[a,{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[a,{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:i,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[a,s],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}
1],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}],type:"Preview",abstractKey:null};var a,t,s,i,r,o;l.hash="25cce2ef508364f6a6d6c7cac4596c27",n.default=l},16179:function(e,n,l){var a=l(48722),t=(l(18312),l(77286));let s=a.default;"default"in s&&(s=s.default),n.default={commit:(0,t.default)({mutation:s})}},19377:function(e,n){const l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"App_timelineItem",selections:[{kind:"InlineFragment",selections:[a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[a,{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:[a,t={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[a,t],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],type:"Comment",abstractKey:null}],type:"TimelineItem",abstractKey:"__isTimelineItem"};var a,t;l.hash="94569422295b12d2b14babc1eae89656",n.default=l},19756:function(e,n,l){l.d(n,{T_:function(){return u},VE:function(){return r},b7:function(){return o}});var a=l(96540),t=l(18312),s=l(71020),i=l(74848);const r="Applicant",o="Approvers",u="Reviewers";class d extends a.Component{constructor(e){super(e),this.inputs=void 0,this.inputs=[]}_memberMap(){const e={};return(this.props.workflow?.approvers||[]).concat(this.props.workflow?.reviewers||[]).forEach(n=>{n.member&&(e[n.member.id]=n.member)}),this.props.applicant&&(e[this.props.applicant.id]=this.props.applicant),e}_onCancel(e){e.preventDefault(),this.props.close()}_onDone(e){e.preventDefault();const n=this._memberMap(),l=this.inputs.filter(e=>e.checked).map(e=>n[e.value]);this.props.changeMembers(l),this.props.close()}_onChange(e,n){this.inputs.forEach(l=>{l.value===e&&(l.checked=n)})}render(){const{applicant:e}=this.props;return(0,i.jsxs)("div",{className:"member-input",children:[(0,i.jsx)("h1",{children:this.props.title||""},"header"),this.props.types.find(e=>e===r)&&e&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:s.default.loc("Applicant")}),(0,i.jsx)("ul",{className:"member-input-list",children:(0,i.jsx)("li",{className:"form-check my-2",children:(0,i.jsxs)("label",{className:"form-check-label",children:[(0,i.jsx)("input",{type:"checkbox",value:e.id,defaultChecked:!!(this.props.members||[]).find(n=>n.id===e?.id),ref:e=>{this.inputs.push(e)},onChange:e=>{this._onChange(e.target.value,e.target.checked)},disabled:this.props.disableViewer&&e.id===this.props.viewer.id,className:"form-check-input"}),e.displayName]})},e.id)})]}),this.props.types.find(e=>e===o)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:s.default.loc("Approvers")}),(0,i.jsx)("ul",{className:"member-input-list",children:(this.props.workflow?.approvers||[]).map(e=>e.member&&(0,i.jsx)("li",{className:"form-check my-2",children:(0,i.jsxs)("label",{className:"form-check-label",children:[(0,i.jsx)("input",{type:"checkbox",value:e.member.id,defaultChecked:!!(this.props.members||[]).find(n=>n.id===e.member?.id),ref:e=>{this.inputs.push(e)},onChange:e=>{this._onChange(e.target.value,e.target.checked)},disabled:this.props.disableViewer&&e.member.id===this.props.viewer.id,className:"form-check-input"}),e.member.displayName]})},e.member.id))})]}),this.props.types.find(e=>e===u)&&0!==(this.props.workflow?.reviewers?.length||0)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:s.default.loc("Reviewers")}),(0,i.jsx)("ul",{className:"member-input-list",children:this.props.workflow.reviewers.map(e=>e.member&&(0,i.jsx)("li",{className:"form-check my-2",children:(0,i.jsxs)("label",{className:"form-check-label",children:[(0,i.jsx)("input",{type:"checkbox",value:e.member.id,defaultChecked:!!(this.props.members||[]).find(n=>n.id===e.member?.id),ref:e=>{this.inputs.push(e)},onChange:e=>{this._onChange(e.target.value,e.target.checked)},disabled:this.props.disableViewer&&e.member.id===this.props.viewer.id,className:"form-check-input"}),e.member.displayName]})},e.member.id))})]}),(0,i.jsxs)("div",{className:"form-group mb-3 float-end ms-auto",children:[(0,i.jsx)("input",{type:"submit",className:"btn btn-secondary btn-sm",value:s.default.loc("Cancel"),onClick:e=>{this._onCancel(e)}}),(0,i.jsx)("input",{type:"submit",className:"btn btn-primary btn-sm",value:s.default.loc("Save Changes"),onClick:e=>{this._onDone(e)}})]})]})}}n.default=(0,t.createFragmentContainer)(d,{})},20007:function(e,n){const l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"App_viewer",selections:[{kind:"InlineFragment",selections:[a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"language",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timeZone",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isStaff",storageKey:null}],type:"User",abstractKey:null},{kind:"InlineFragment",selections:[a,t],type:"ExternalMember",abstractKey:null}],type:"Member",abstractKey:"__isMember"};var a,t;l.hash="36b9e23cb0d8e70fc4c583574d49f10f",n.default=l},23911:function(e,n){const l={fragment:{argumentDefinitions:a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],kind:"Fragment",metadata:null,name:"StartApprovalMutation",selections:[{alias:null,args:t=[{kind:"V
1ariable",name:"input",variableName:"input"}],concreteType:"Approval",kind:"LinkedField",name:"startApproval",plural:!1,selections:[s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"startedAt",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"approvedAt",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:o=[s],storageKey:null},p={alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"startedBy",plural:!1,selections:c=[s,u={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null},m={alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"initialEntryVersion",plural:!1,selections:o,storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[f={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:c,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[f,y={alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[k={kind:"InlineFragment",selections:[s,{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[s,v={alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:c,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[s,u],storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"StartApprovalMutation",selections:[{alias:null,args:t,concreteType:"Approval",kind:"LinkedField",name:"startApproval",plural:!1,selections:[s,i,r,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:[F={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},s],storageKey:null},p,m,{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h,g,{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[x={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:K=[F,s,u,d],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[x,y],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[F,{kind:"TypeDiscriminator",abstractKey:"__isTimelineItem"},k,{kind:"InlineFragment",selections:[s,v,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:K,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[F,s,u],storageKey:null},w,b],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"914fddd7b705b8eae77e4c728bdda7b4",id:null,metadata:{},name:"StartApprovalMutation",operationKind:"mutation",text:"mutation StartApprovalMutation(\n  $input: StartApprovalInput!\n) {\n  startApproval(input: $input) {\n    id\n    startedAt\n    approvedAt\n    watchers {\n      __typename\n      id\n    }\n    startedBy {\n      id\n      displayName\n      userpicUrl\n    }\n    initialEntryVersion {\n      id\n    }\n    workflow {\n      id\n      label\n      requiresAll\n      approvers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n      }\n      reviewers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        watch\n      }\n    }\n    timelineItems {\n      __typename\n      __isTimelineItem: __typename\n      ... on EntryVersion {\n        id\n        note\n      }\n      ... on Comment {\n        id\n        text\n        author {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        destinations {\n          __typename\n          id\n          displayName\n        }\n        createdAt\n        status\n      }\n    }\n  }\n}\n"}};var a,t,s,i,r,o,u,d,c,p,m,h,g,f,y,k,v,w,b,F,K,x;
1l.hash="7482854161069ea4d4c85aa23fff96a8",n.default=l},24107:function(e,n,l){var a=l(96540),t=l(18312),s=l(74848);class i extends a.Component{constructor(...e){super(...e),this.workflows=void 0}_onChange(e){e.preventDefault(),this.props.change(this.props.workflows[this.workflows.selectedIndex])}render(){return(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"form-group mb-3",children:(0,s.jsx)("select",{id:"workflow",className:"form-control",ref:e=>{this.workflows=e},onChange:e=>{this._onChange(e)},children:this.props.workflows.map(e=>(0,s.jsx)("option",{children:e.label},e.id))})})})}}n.default=(0,t.createFragmentContainer)(i,{})},36034:function(e,n){const l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"App_approval",selections:[a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"approvedAt",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:t=[a],storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"startedBy",plural:!1,selections:i=[a,s={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"initialEntryVersion",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[r={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:i,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[{kind:"InlineFragment",selections:[a,{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[a,{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:i,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[a,s],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],type:"Comment",abstractKey:null}],storageKey:null}],type:"Approval",abstractKey:null};var a,t,s,i,r;l.hash="4935f86ba43943243eb9fd86852f7f6a",n.default=l}
1,37591:function(e,n){n.default=604800},41717:function(e,n,l){var a=l(96540),t=l(18312),s=l(71020),i=l(86469),r=l(37591),o=l(74848);class u extends a.Component{constructor(...e){super(...e),this.comment=void 0}_onStartApproval(e){e.preventDefault(),this.props.startApproval(this.comment.value)}_storageKey(){return`approval-comment-${this.props.preview.id}`}_onInput(){i.Lr.setItem(this._storageKey(),this.comment.value,r.default)}_restoreValue(){return i.Lr.getItem(this._storageKey())||""}render(){return(0,o.jsxs)("div",{className:"clearfix",children:[(0,o.jsx)("div",{className:"form-group mb-3",children:(0,o.jsx)("textarea",{className:"form-control",defaultValue:this._restoreValue(),onInput:()=>this._onInput(),ref:e=>{this.comment=e}})}),(0,o.jsx)("div",{className:"form-group mb-3 float-end ms-auto",children:(0,o.jsx)("input",{type:"submit",className:"btn btn-primary btn-sm",onClick:e=>this._onStartApproval(e),value:s.default.loc("Submit Approval Request")})})]})}}n.default=(0,t.createFragmentContainer)(u,{})},48722:function(e,n){const l={fragment:{argumentDefinitions:a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],kind:"Fragment",metadata:null,name:"AddCommentMutation",selections:[{alias:null,args:t=[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Approval",kind:"LinkedField",name:"addComment",plural:!1,selections:[s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"startedAt",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"approvedAt",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:o=[s],storageKey:null},p={alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"startedBy",plural:!1,selections:c=[s,u={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null},m={alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"initialEntryVersion",plural:!1,selections:o,storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[f={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:c,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[f,y={alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[k={kind:"InlineFragment",selections:[s,{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[s,v={alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:c,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[s,u],storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"AddCommentMutation",selections:[{alias:null,args:t,concreteType:"Approval",kind:"LinkedField",name:"addComment",plural:!1,selections:[s,i,r,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:[F={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},s],storageKey:null},p,m,{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h,g,{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[x={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:K=[F,s,u,d],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[x,y],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[F,{kind:"TypeDiscriminator",abstractKey:"__isTimelineItem"},k,{kind:"InlineFragment",selections:[s,v,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:K,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[F,s,u],storageKey:null}
1,w,b],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"f7856b9b9edbc8cc2db63989e8e2cd15",id:null,metadata:{},name:"AddCommentMutation",operationKind:"mutation",text:"mutation AddCommentMutation(\n  $input: AddCommentInput!\n) {\n  addComment(input: $input) {\n    id\n    startedAt\n    approvedAt\n    watchers {\n      __typename\n      id\n    }\n    startedBy {\n      id\n      displayName\n      userpicUrl\n    }\n    initialEntryVersion {\n      id\n    }\n    workflow {\n      id\n      label\n      requiresAll\n      approvers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n      }\n      reviewers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        watch\n      }\n    }\n    timelineItems {\n      __typename\n      __isTimelineItem: __typename\n      ... on EntryVersion {\n        id\n        note\n      }\n      ... on Comment {\n        id\n        text\n        author {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        destinations {\n          __typename\n          id\n          displayName\n        }\n        createdAt\n        status\n      }\n    }\n  }\n}\n"}};var a,t,s,i,r,o,u,d,c,p,m,h,g,f,y,k,v,w,b,F,K,x;l.hash="8a68f4729860576e177d51d5c94f80d5",n.default=l},58068:function(e,n,l){var a=l(96540),t=l(71020),s=l(74848);class i extends a.Component{render(){return(0,s.jsx)("div",{className:"modal fade",tabIndex:-1,role:"dialog",children:(0,s.jsx)("div",{className:"modal-dialog",children:(0,s.jsxs)("div",{className:"modal-content",children:[(0,s.jsxs)("div",{className:"modal-body",children:[(0,s.jsx)("div",{children:this.props.message}),!!this.props.reload&&(0,s.jsx)("div",{children:t.default.loc("Please reload and check the update.")})]}),(0,s.jsx)("div",{className:"modal-footer",children:this.props.reload?(0,s.jsx)("button",{type:"button",className:"btn btn-primary",onClick:this.props.reload,children:t.default.loc("Reload")}):(0,s.jsx)("button",{type:"button",className:"btn btn-primary",onClick:this.props.close,children:t.default.loc("OK")})})]})})})}}n.default=i},60771:function(e,n,l){var a=l(15643),t=l(20007),s=l(36034),i=l(19377),r=l(15232),o=l(49568),u=l(96540),d=l(18312),c=l(71020),p=l(13768),m=l(6728),h=l(24107),g=l(92794),f=l(41717),y=l(98009),k=l(87581),v=l(78430),w=l(19756),b=l(72161),F=l(73915),K=l(13334),x=l(16179),_=l(73836),L=l(5815),N=l(74848);class T extends u.Component{constructor(e){let n;super(e),this.fragmentManager=void 0,this.timeline=void 0,this.diffUpcoming=void 0,this.fragments=void 0;let l=[];this.props.preview&&(n=this.props.preview.approval,l=this.props.preview.selectableWorkflows);const a=n?n.workflow:l.length?l[0]:null,t=this.props.viewer&&this.props.viewer.language?this.props.viewer:this.props.preview?.blog;this.props.viewer?.isStaff&&(document.documentElement.dataset.currentUserIsStaff="true"),c.default.I18N.setMessages(window.MTI18NStrings),c.default.I18N.setCurrentLocale(t?.language||"ja_JP"),c.default.timezone=t?.timeZone||"Asia/Tokyo",c.default.locale=t?.language||"ja_JP",this.fragmentManager=new m.default({setFragment:this.props.setFragment}),this.timeline=null,this.diffUpcoming=null,this.state={workflow:a,watcherMap:(0,o.T5)({}),destinations:null,isCookieBlocked:!1}}UNSAFE_componentWillMount(){0===this.props.preview?.workflowCount&&this.props.removeApp()}_handleFragment(e){if("diff-upcoming"===e){if(this.props.preview){const{entry:e}=this.props.preview;setTimeout(()=>{(0,p.X)(Object.assign({},this.props,{fragmentManager:this.fragmentManager,prevEntryVersion:e.currentVersion,entryVersion:e.upcomingVersion}))},100)}}else if(e.match(/^version-(\d+)/)){this.fragments=[""];const e=`entryVersion:${RegExp.$1}`;let n,l=!1;this.props.preview?.approval?.timelineItems?.forEach(a=>{"text"in a||l||(a.id!==e?n=a:l=!0)}),l&&n||(n=this.props.preview?.approval.initialEntryVersion),setTimeout(()=>{(0,p.X)(Object.assign({},this.props,{fragmentManager:this.fragmentManager,prevEntryVersion:n,entryVersion:{id:e}}))},100)}if(this.timeline)if(e.match(/^comment-(\d+)/)){const n=`comment:${RegExp.$1}`,l=this.props.preview?.approval?.timelineItems?.find(e=>e.id===n&&"destinations"in e&&e.destinations?.find(e=>e.id===this.props.viewer.id));l&&setTimeout(()=>{const n=this.timeline?.replyLinks[e];n?.click()},100)}else e.match(/^versions-(\d+)/)&&setTimeout(()=>{const n=this.timeline?.diffVersionsLinks[e];n&&n.click()},100)}componentDidMount(){this.props.onLoad({initFragments:({fragments:e})=>{this.fragmentManager.init({fragments:e}),this._handleFragment(this.fragmentManager.last()),this.fragmentManager.isEmpty()&&0===this.props.preview?.selectableWorkflows.length&&this.props.hideApp()},setState:e=>{this.props.viewer||this.setState(e)}})}_currentWatchers(){return this.props.preview&&this.props.preview.approval?this.props.preview.approval.watchers:this.state.watcherMap.get(this.state.workflow.id)?this.state.watcherMap.get(this.state.workflow.id):(this.state.workflow.reviewers||[]).filter(e=>e.watch).map(e=>e.member)}_startApproval(e){return K.default.commit({environment:this.props.relay.environment,entryVersionId:this.props.previewingVersionId,viewer:this.props.viewer,preview:this.props.preview,workflow:this.state.workflow,watchers:this._currentWatchers(),comment:e,reload:this.props.reload})}_addComment(e){return x.default.commit({environment:this.props.relay.environment,entryVersionId:this.props.previewingVersionId,viewer:this.props.viewer,preview:this.props.preview,workflow:this.state.workflow,watchers:this._currentWatchers(),destinations:this.state.destinations,comment:e,reload:this.props.reload}).then(()=>{this.fragmentManager.pop()})}_approve(e){return _.default.commit({environment:this.props.relay.environment,entryVersionId:this.props.previewingVersionId,viewer:this.props.viewer,preview:this.props.preview,comment:e,approval:this.props.preview.approval,reload:this.props.reload})}_changeWatchers(e,n){this.props.preview?.approval?L.default.commit({environment:this.props.relay.environment,reload:this.props.reload,approval:this.props.preview.approval,preview:this.props.preview,watchers:n}):this.setState({watcherMap:this.state.watcherMap.set(e.id,n)})}_changeDestinations(e){const n=e.filter((n,l)=>e.indexOf(n)===l).filter(e=>e.id!==this.props.viewer.id);
1this.setState({destinations:n})}_unauthorizedMessage(e){return c.default.React.enableLink(e,{onClick:e=>{e.preventDefault(),this.props.siteDataClient.signIn()}})}_isViewerApprover(){const e=this.props.preview?.approval;return e&&e.startedAt&&e.workflow?.approvers?.find(({member:e})=>e?.id===this.props.viewer.id)}_isNotApproved(){const e=this.props.preview?.approval;return!(e&&e.approvedAt)}_memberListProps(){const e=this.props.preview?.approval,{workflow:n}=this.state;return{key:`MemberList-${n?.id}`,applicant:e?e.startedBy:null,workflow:n,watchers:this._currentWatchers(),openMemberInput:e=>{this.setState({selectingMembers:e})},changeWatchers:e=>{this._changeWatchers(n,e)}}}render(){if(0===this.props.preview?.workflowCount)return(0,N.jsx)("noscript",{});if(!this.props.viewer)return(0,N.jsx)("div",{className:"contents",children:(0,N.jsxs)("p",{className:"form-text mt-help-block-unauthorized",children:[this.state.isCookieBlocked&&(0,N.jsx)("span",{className:"mt-help-block-unauthorized-cookies",children:c.default.loc("Please make sure that third party cookies are sent (especially for %1) in browser settings.",this.props.endpoint.replace(/https?:\/\/|\/.*/g,""))},"cookies"),this._unauthorizedMessage(c.default.loc('In order to use the workflow function, please <a href="%1">sign in</a> to MovableType.net, if you have an account. If you do not have an account please access again from the URL described in the notification mail.',"#")),(0,N.jsx)("span",{className:"clearfix",children:(0,N.jsx)("span",{className:"float-end ms-auto",children:(0,N.jsx)("a",{className:"btn btn-primary btn-sm",onClick:e=>{e.preventDefault(),this.props.siteDataClient.signIn()},children:c.default.loc("Sign In")})})})]},"unauthorized")});if(0===this.props.preview?.selectableWorkflows.length)return(0,N.jsx)("div",{className:"contents",children:(0,N.jsx)("p",{className:"form-text mt-help-block-unauthorized",children:c.default.React.nl2br(c.default.loc("You are not authorized to view this workflow information.\nPlease check with the site administrator."))},"unauthorized")});const e=this.props.preview?.approval,n=this.props.preview?.selectableWorkflows,{workflow:l}=this.state,a=[],t=[],s=(()=>e&&e.approvedAt?c.default.loc("Approved"):e&&e.startedAt?c.default.loc("Waiting for approval"):this.props.preview?.canEditEntry?c.default.loc("REQUEST_APPROVAL_LABEL"):c.default.loc("Comments"))();if(t.push((0,N.jsx)("h1",{children:(0,N.jsxs)("span",{className:"approval-header",children:[s,!!l&&`: ${l.label}`]})},"header")),this._isViewerApprover()&&this._isNotApproved()){const{key:n,...l}=this._memberListProps();t.push((0,N.jsx)(g.default,{...l,isEditable:!0},n));const a=e?.timelineItems?.find(e=>"status"in e&&2===e.status&&e.author?.id===this.props.viewer.id);!a&&this.props.preview&&t.push((0,N.jsx)(y.default,{preview:this.props.preview,approve:(...e)=>this._approve(...e)},"ApproveInput"))}else if(e&&e.startedAt||!this.props.preview?.canEditEntry){const{key:e,...n}=this._memberListProps();t.push((0,N.jsx)(g.default,{...n,isEditable:!1},e))}else if(n?.length){e||t.push((0,N.jsx)(h.default,{workflows:n,change:e=>{this.setState({workflow:e})}},"WorkflowInput"));const{key:a,...s}=this._memberListProps();t.push((0,N.jsx)(g.default,{...s,isEditable:!0},a)),t.push((0,N.jsx)(f.default,{workflow:l,preview:this.props.preview,workflows:n,startApproval:(...e)=>this._startApproval(...e)},"ApprovalInput"))}return this.props.preview?.entry.upcomingVersion&&t.push((0,N.jsx)(F.default,{componentRef:e=>{this.diffUpcoming=e},preview:this.props.preview,fragmentManager:this.fragmentManager},"DiffUpcoming")),a.push((0,N.jsx)("div",{className:"approval-group",children:t},"approval-group")),e?a.push((0,N.jsx)(b.default,{componentRef:e=>{this.timeline=e},preview:this.props.preview,initialEntryVersion:e.initialEntryVersion,approvedAt:e.approvedAt,items:e.timelineItems,workflow:l,changeDestinations:e=>{this._changeDestinations(e)},fragmentManager:this.fragmentManager},"Timeline")):a.push((0,N.jsx)(b.default,{items:[]},"Timeline")),n?.length&&(!e||!e.approvedAt&&this.props.preview)&&a.push((0,N.jsxs)("div",{className:"comment-input-group",children:[(0,N.jsx)(v.default,{workflow:l,applicant:e?e.startedBy:null,destinations:this.state.destinations,openMemberInput:e=>{this.setState({selectingMembers:e})},changeDestinations:e=>{this._changeDestinations(e)}},"DestinationList"),(0,N.jsx)(k.default,{preview:this.props.preview,addComment:e=>this._addComment(e)},"CommentInput")]},"comment-input-group")),(0,N.jsxs)("div",{children:[(0,N.jsx)("div",{id:"contents",className:"contents",children:a},"contents"),this.state.selectingMembers&&(0,N.jsx)(w.default,{...this.state.selectingMembers,viewer:this.props.viewer,close:()=>{this.setState({selectingMembers:null})}},"MemberInput")]})}}r.default,i.default,s.default,n.default=(0,d.createFragmentContainer)(T,{viewer:t.default,preview:a.default})},62857:function(e,n){const l={fragment:{argumentDefinitions:a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],kind:"Fragment",metadata:null,name:"ApproveMutation",selections:[{alias:null,args:t=[{kind:"V
1ariable",name:"input",variableName:"input"}],concreteType:"Approval",kind:"LinkedField",name:"approve",plural:!1,selections:[s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"startedAt",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"approvedAt",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:o=[s],storageKey:null},p={alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"startedBy",plural:!1,selections:c=[s,u={alias:null,args:null,kind:"ScalarField",name:"displayName",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"userpicUrl",storageKey:null}],storageKey:null},m={alias:null,args:null,concreteType:"EntryVersion",kind:"LinkedField",name:"initialEntryVersion",plural:!1,selections:o,storageKey:null},{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"requiresAll",storageKey:null},{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[f={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:c,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[f,y={alias:null,args:null,kind:"ScalarField",name:"watch",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[k={kind:"InlineFragment",selections:[s,{alias:null,args:null,kind:"ScalarField",name:"note",storageKey:null}],type:"EntryVersion",abstractKey:null},{kind:"InlineFragment",selections:[s,v={alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:c,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[s,u],storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"ApproveMutation",selections:[{alias:null,args:t,concreteType:"Approval",kind:"LinkedField",name:"approve",plural:!1,selections:[s,i,r,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"watchers",plural:!0,selections:[F={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},s],storageKey:null},p,m,{alias:null,args:null,concreteType:"Workflow",kind:"LinkedField",name:"workflow",plural:!1,selections:[s,h,g,{alias:null,args:null,concreteType:"Approver",kind:"LinkedField",name:"approvers",plural:!0,selections:[x={alias:null,args:null,concreteType:null,kind:"LinkedField",name:"member",plural:!1,selections:K=[F,s,u,d],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Reviewer",kind:"LinkedField",name:"reviewers",plural:!0,selections:[x,y],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"timelineItems",plural:!0,selections:[F,{kind:"TypeDiscriminator",abstractKey:"__isTimelineItem"},k,{kind:"InlineFragment",selections:[s,v,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"author",plural:!1,selections:K,storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"destinations",plural:!0,selections:[F,s,u],storageKey:null},w,b],type:"Comment",abstractKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"aeb3a6b8fb4ceec74df10392021a2cc5",id:null,metadata:{},name:"ApproveMutation",operationKind:"mutation",text:"mutation ApproveMutation(\n  $input: ApproveInput!\n) {\n  approve(input: $input) {\n    id\n    startedAt\n    approvedAt\n    watchers {\n      __typename\n      id\n    }\n    startedBy {\n      id\n      displayName\n      userpicUrl\n    }\n    initialEntryVersion {\n      id\n    }\n    workflow {\n      id\n      label\n      requiresAll\n      approvers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n      }\n      reviewers {\n        member {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        watch\n      }\n    }\n    timelineItems {\n      __typename\n      __isTimelineItem: __typename\n      ... on EntryVersion {\n        id\n        note\n      }\n      ... on Comment {\n        id\n        text\n        author {\n          __typename\n          id\n          displayName\n          userpicUrl\n        }\n        destinations {\n          __typename\n          id\n          displayName\n        }\n        createdAt\n        status\n      }\n    }\n  }\n}\n"}};var a,t,s,i,r,o,u,d,c,p,m,h,g,f,y,k,v,w,b,F,K,x;l.hash="04bca402d84e82313b5ab484fdc08c3c",n.default=l},72161:function(e,n,l){var a=l(7972),t=l.n(a),s=l(96540),i=l(18312),r=l(71020),o=l(66722),u=l(80678),d=l(13768),c=l(74848);const p="M/D H:m";class m extends s.Component{constructor(e){super(e),this.replyLinks=void 0,this.diffVersionsLinks=void 0,this.rootNode=void 0,this.updateTimeIntervalId=void 0,this.replyLinks={},this.diffVersionsLinks={},o.default.setCurrentTimezone(r.default.timezone),o.default.setCurrentLocale(r.default.locale)}_scrollToRecentComment({duration:e=0,delay:n=10}={}){setTimeout(()=>{const n=this.rootNode.childNodes[0];if(!n||"DIV"!==n.nodeName)return;const l=(t()("#timeline-contents-wrap").scrollTop()||0)+(t()(n).offset()?.top||0);t()("#timeline-contents-wrap").animate({scrollTop:l},{duration:e,queue:!1})},n)}componentDidMount(){this.updateTimeIntervalId=setInterval(()=>{Array.from(this.rootNode.querySelectorAll("[data-iso-8601]")).forEac
1h(e=>{const n=e.getAttribute("data-iso-8601")||void 0;e.innerHTML=o.default.fromNow({date:n,format:p})})},6e4),this._scrollToRecentComment()}componentWillUnmount(){this.updateTimeIntervalId&&clearInterval(this.updateTimeIntervalId)}componentDidUpdate(e,n){this.props.items&&0!==this.props.items.length&&e.items.length!==this.props.items.length&&this._scrollToRecentComment({duration:400,delay:100})}_onChangeDestinations(e,n){e.preventDefault(),this.props.changeDestinations&&this.props.changeDestinations(n)}_onShowDiff(e,n,l,a){e.preventDefault(),(0,d.X)(Object.assign(Object.assign({},this.props,{prevEntryVersion:n,entryVersion:l,fragment:a})))}_formatText(e){if(":mt-thumbsup:"===e)return(0,c.jsx)("i",{className:"fa fa-thumbs-up mt-timeline-thumbsup","aria-hidden":"true"});const n=u.default.autolinker.parse(e),l=[];let a=0;return n.forEach((n,t)=>{l.push(r.default.React.nl2br(e.substring(a,n.getOffset())));const i=n.buildTag();l.push((0,s.createElement)("a",{...i.getAttrs(),key:t,dangerouslySetInnerHTML:{__html:i.getInnerHTML()}})),a=n.getOffset()+n.getMatchedText().length}),l.push(r.default.React.nl2br(e.substring(a))),l}render(){let e=this.props.initialEntryVersion;const n=Array.from(this.props.items||[]).reduce((n,l)=>{if("text"in l)n.push(l);else if("note"in l){const a=n[n.length-1];!a||"text"in a?n.push({versions:[l],prev:e}):(e=l,"versions"in a&&a.versions.push(l))}return n},[]);return(0,c.jsx)("div",{id:"timeline-contents-wrap",className:"timeline-contents-wrap",children:(0,c.jsx)("div",{id:"timeline-contents",className:"timeline-contents",ref:e=>{this.rootNode=e},children:n.reverse().map(e=>{if("text"in e){const n=e,l=[(0,c.jsx)("div",{id:`comment-${n.id}`,className:"timeline-item timeline-item-comment",children:(0,c.jsxs)("div",{className:"timeline-item-comment-inner",children:[(0,c.jsx)("div",{className:"userpic-wrap",children:n.author?.userpicUrl?(0,c.jsx)("img",{src:n.author.userpicUrl,className:"mt-userpic"},"userpic-img"):(0,c.jsx)("i",{className:"fa fa-user-circle mt-userpic","aria-hidden":"true"})},"userpic-wrap"),(0,c.jsxs)("div",{className:"comment-contents-wrap",children:[(0,c.jsxs)("div",{className:"comment-contents-meta",children:[n.author?.displayName,!this.props.approvedAt&&(0,c.jsx)("a",{href:"#",ref:e=>{this.replyLinks[`comment-${n.id.replace(/.*:/,"")}`]=e},onClick:e=>this._onChangeDestinations(e,n.author?(n.destinations||[]).concat(n.author):n.destinations),children:(0,c.jsx)("i",{className:"fa fa-reply","aria-hidden":"true"})}),(0,c.jsx)("div",{className:"float-end ms-auto","data-iso-8601":n.createdAt,title:o.default.format(n.createdAt),children:o.default.fromNow({date:n.createdAt,format:p})},"time")]},"comment-contents-meta"),0!==(n.destinations||[]).length&&(0,c.jsx)("ul",{className:"mt-timeline-destinations-list",children:(n.destinations||[]).map(e=>(0,c.jsx)("li",{className:"badge bg-secondary",children:e.displayName},`display-name-${e.id}`))},"destinations"),(0,c.jsxs)("div",{className:"comment-text",children:[n.status===u.N4&&(0,c.jsxs)("div",{className:"comment-status",children:[(0,c.jsx)("i",{className:"fa fa-file"}),r.default.loc("WORKFLOW_TIMELINE_STARTED")]}),n.status===u.P2&&(0,c.jsxs)("div",{className:"comment-status",children:[(0,c.jsx)("i",{className:"fa fa-check-circle","aria-hidden":"true"}),r.default.loc("WORKFLOW_TIMELINE_APPROVED")]}),this._formatText(n.text||"")]},"comment-text")]},"comment-contents-wrap")]})},`comment-${n.id}`)];return n.status===u.P2&&this.props.approvedAt===n.createdAt&&l.unshift((0,c.jsxs)("div",{className:"timeline-item timeline-item-approved mx-2",children:[(0,c.jsx)("i",{className:"fa fa-check-circle-o","aria-hidden":"true"}),r.default.loc("WORKFLOW_TIMELINE_READY_TO_PUBLISHED")]},"approved")),l}if("versions"in e){const{versions:n,prev:l}=e,a=n[n.length-1],t=`versions-${n[0].id.replace(/.*:/,"")}`;return(0,c.jsxs)("div",{id:`versions-${a.id}`,className:"timeline-item timeline-item-version",children:[(0,c.jsxs)("a",{href:"#",ref:e=>{this.diffVersionsLinks[t]=e},onClick:e=>{this._onShowDiff(e,l,a,t)},children:[(0,c.jsx)("i",{className:"fa fa-file","aria-hidden":"true"}),r.default.loc("WORKFLOW_TIMELINE_UPDATED")]}),n.map(e=>(0,c.jsx)("div",{children:e.note},`version-note-${e.id}`))]},`versions-${a.id}`)}})})})}}n.default=(0,i.createFragmentContainer)(m,{})},73836:function(e,n,l){var a=l(62857),t=(l(18312),l(77286)),s=l(80678);let i=a.default;"default"in i&&(i=i.default),n.default={commit:(0,t.default)({mutation:i,commentStatus:s.P2})}},73915:function(e,n,l){var a=l(96540),t=l(18312),s=l(13768),i=l(71020),r=l(74848);class o extends a.Component{_onShowDiff(e,n,l,a){e.preventDefault(),(0,s.X)(Object.assign({},this.props,{prevEntryVersion:n,entryVersion:l,fragment:a}))}render(){return(0,r.jsx)("div",{id:"diff-upcoming",className:"diff-upcoming",children:(0,r.jsx)("a",{href:"#",onClick:e=>{this._onShowDiff(e,this.props.preview.entry.currentVersion,this.props.preview.entry.upcomingVersion,"diff-upcoming")},children:i.default.loc("Show the difference from the published.")})})}}n.default=(0,t.createFragmentContainer)(o,{})},77286:function(e,n,l){l.d(n,{default:function(){return s}});var a=l(18312),t=l(91470);function s({mutation:e,commentStatus:n}){return({environment:l,reload:s,entryVersionId:i,viewer:r,approval:o,preview:u,workflow:d,watchers:c,destinations:p,comment:m})=>{let h;if("operation"in e){const n=e.operation.selections[0];n&&"name"in n&&(h=n.name)}const g={input:{entryVersionId:i,approvalId:o?o.id:null,previewId:u.id,comment:m}};return void 0!==p&&(g.input.destinationIds=p?p.map(e=>e.id):null),void 0!==d&&(g.input.workflowId=d?.id),void 0!==c&&(g.input.watcherIds=c?c.map(e=>e.id):null),new Promise((i,o)=>{(0,a.commitMutation)(l,{mutation:e,variables:g,onCompleted:(0,t.default)({resolve:i,reject:o,reload:s}),updater:e=>{const n=e.getRootField(h);if(!n)return;const l=e.get(u.id);l?.setLinkedRecord(n,"approval")},optimisticUpdater:e=>{const l=e.get(u.id);let a=l?.getLinkedRecord("approval");if(!a){const n=Math.floor(65536*(1+Math.random())),t=e.create(`approval:new:${n}`,"Approval");t.setLinkedRecord(e.get(d?.id||"")||null,"workflow"),t.setLinkedRecords([],"timelineItems"),l?.setLinkedRecord(t,"approval"),a=t}const t=Math.floor(65536*(1+Math.random())),s=e.create(`comment:new:${t}`,"Comment");s.setValue(`comment:new:${t}`,"id"),s.setValue(m,"text"),n&&s.setValue(n,"status"),s.setLinkedRecords((p||[]).map(n=>e.get(n.id)||null),"destinations"),s.setLinkedRecord(e.get(r?.id||"")||null,"author"),a.setLinkedRecords((a.getLinkedRecords("timelineItems")||[]).concat([s]),"timelineItems")}})})}}},78430:function(e,n,l){var a=l(96540),t=l(18312),s=l(71020),i=l(19756),r=l(74848);class o extends a.Component{_onClickEdit(e){e.preventDefault(),this.props.openMemberInput({t
1itle:s.default.loc("Notification Destination"),workflow:this.props.workflow,members:this._currentDestinations(),applicant:this.props.applicant,types:[i.VE,i.b7,i.T_],disableViewer:!0,changeMembers:e=>{this.props.changeDestinations(e)}})}_currentDestinations(){return this.props.destinations?this.props.destinations:[]}render(){return(0,r.jsxs)("div",{className:"form-group mb-3 destination-list",id:"destination-list",children:[s.default.loc("Notification Destination"),(0,r.jsx)("a",{className:"edit-member-link",href:"#",onClick:e=>{this._onClickEdit(e)},children:(0,r.jsx)("i",{className:"fa fa-pencil","aria-hidden":"true"})}),!!this.props.destinations&&0!==this.props.destinations.length&&(0,r.jsxs)("ul",{className:"member-list",children:[(0,r.jsx)("li",{children:(0,r.jsx)("i",{className:"fa fa-user-circle-o","aria-hidden":"true"})},"icon"),this.props.destinations.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"badge bg-secondary",children:e.displayName})},e.id))]})]})}}n.default=(0,t.createFragmentContainer)(o,{})},80678:function(e,n,l){l.d(n,{N4:function(){return t},P2:function(){return s},default:function(){return r}});var a=l(67917);const t=1,s=2,i=Symbol();class r{static get autolinker(){return this[i]||(this[i]=new a.nn({urls:{schemeMatches:!0,wwwMatches:!0,tldMatches:!0},email:!1,phone:!1,stripPrefix:{scheme:!0,www:!0},truncate:{length:32,location:"end"}})),this[i]}}},87581:function(e,n,l){var a=l(7972),t=l.n(a),s=l(96540),i=l(18312),r=l(71020),o=l(86469),u=l(37591),d=l(74848);class c extends s.Component{constructor(e){super(e),this.thumbsupLink=void 0,this.comment=void 0,this.updateCommentHeightTimer=void 0,this.dummyComment=void 0,this.commentOffset=void 0,this.state={comment:this._restoreValue()}}_onAddComment(e){e.preventDefault();const{comment:n}=this.state;this.props.addComment(n).catch(()=>{this.setState({comment:n})}),this.setState({comment:""})}_onAddThumbsup(e){e.preventDefault(),this.thumbsupLink.classList.contains("focus")||(this.thumbsupLink.classList.add("focus"),setTimeout(()=>this.thumbsupLink?.classList.remove("focus"),5e3),this.props.addComment(":mt-thumbsup:"))}_storageKey(){return`preview-comment-${this.props.preview.id}`}_updateCommentHeight(){if(this.updateCommentHeightTimer&&(clearTimeout(this.updateCommentHeightTimer),this.updateCommentHeightTimer=null),!this.dummyComment||!this.commentOffset){const e=t()(this.comment),n=e.clone(!1).css({position:"absolute",top:0,left:0,zIndex:-100,visiblity:"hidden"}).attr({rows:1});e.after(n),this.dummyComment=n[0],this.commentOffset=(e.outerHeight()||0)-(e.innerHeight()||0)}this.updateCommentHeightTimer=setTimeout(()=>{this.dummyComment.value=this.comment.value,this.comment.style.height=`${this.dummyComment.scrollHeight+this.commentOffset}px`},50)}_onInput(){this.setState({comment:this.comment.value}),this._updateCommentHeight()}_restoreValue(){return o.Lr.getItem(this._storageKey())||""}componentDidMount(){this._updateCommentHeight()}componentDidUpdate(){o.Lr.setItem(this._storageKey(),this.state.comment,u.default)}render(){const{comment:e}=this.state;return(0,d.jsxs)("div",{className:"clearfix comment-input",children:[(0,d.jsxs)("div",{className:"form-group mb-3",style:{position:"relative"},children:[(0,d.jsx)("a",{href:"#",className:"thumbsup-link",ref:e=>{this.thumbsupLink=e},onClick:e=>this._onAddThumbsup(e),children:(0,d.jsx)("i",{className:"fa fa-thumbs-up","aria-hidden":"true"})}),(0,d.jsx)("textarea",{className:"form-control",placeholder:r.default.loc("Add comment."),value:e,onChange:()=>{},onInput:()=>this._onInput(),ref:e=>{this.comment=e}})]}),(0,d.jsx)("div",{className:"form-group mb-3 float-end ms-auto px-2",children:(0,d.jsx)("input",{type:"submit",className:"btn btn-secondary btn-sm",onClick:e=>this._onAddComment(e),disabled:""===e,value:r.default.loc("Send Comment")})})]})}}n.default=(0,i.createFragmentContainer)(c,{})},91470:function(e,n,l){l.d(n,{default:function(){return s}});var a=l(37207),t=l(58068);function s({resolve:e,reject:n,reload:l}){return(s,i)=>{i&&i.length>=1?(i[0].refresh?(0,a.default)(t.default,{message:i[0].message,reload:l}):(0,a.default)(t.default,{message:i[0].message}),n()):e()}}},92794:function(e,n,l){var a=l(96540),t=l(18312),s=l(71020),i=l(19756),r=l(74848);class o extends a.Component{_onClickEditWatchers(e){e.preventDefault(),this.props.openMemberInput({workflow:this.props.workflow,members:this._currentWatchers(),types:[i.T_],disableViewer:!1,changeMembers:e=>{this.props.changeWatchers(e)}})}_currentWatchers(){return(this.props.workflow?.reviewers||[]).filter(e=>this._isWatcher(e)).map(e=>e.member)}_isWatcher(e){return this.props.watchers?!!this.props.watchers.find(n=>
1e.member&&n.id===e.member.id):!!e.watch}render(){const e=this._currentWatchers();return(0,r.jsxs)("div",{children:[!!this.props.applicant&&(0,r.jsxs)("div",{className:"form-group mb-3",children:[(0,r.jsx)("span",{className:"member-list-header",children:s.default.loc("Applicant")}),(0,r.jsxs)("ul",{className:"member-list member-list-applicant",children:[(0,r.jsx)("li",{children:(0,r.jsx)("i",{className:"fa fa-user-circle-o","aria-hidden":"true"})},"icon"),(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"badge bg-secondary",children:this.props.applicant.displayName})},this.props.applicant.id)]})]}),(0,r.jsxs)("div",{className:"form-group mb-3",children:[(0,r.jsx)("span",{className:"member-list-header",children:s.default.loc("Approvers")}),(0,r.jsxs)("ul",{className:"member-list member-list-approvers",children:[(0,r.jsx)("li",{children:(0,r.jsx)("i",{className:"fa fa-user-circle-o","aria-hidden":"true"})},"icon"),this.props.workflow?.approvers?.map(e=>{const n=e.member;return n?(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"badge bg-secondary",children:n.displayName})},n.id):""})]})]}),0!==(this.props.workflow?.reviewers?.length||0)&&(0,r.jsxs)("div",{className:"form-group mb-3",children:[(0,r.jsxs)("span",{className:"member-list-header",children:[s.default.loc("Reviewers"),this.props.isEditable&&(0,r.jsx)("a",{className:"edit-member-link",href:"#",onClick:e=>{this._onClickEditWatchers(e)},children:(0,r.jsx)("i",{className:"fa fa-pencil","aria-hidden":"true"})})]}),0!==e.length&&(0,r.jsxs)("ul",{className:`member-list member-list-reviewers member-list-reviewers-${e.length}`,children:[(0,r.jsx)("li",{children:(0,r.jsx)("i",{className:"fa fa-user-circle-o","aria-hidden":"true"})},"icon"),e.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"badge bg-secondary",children:e.displayName})},e.id))]}),e.length>=3&&(0,r.jsx)("span",{className:"other-reviewer-count",children:s.default.loc("%1 more reviewers...",e.length-1)})]})]})}}n.default=(0,t.createFragmentContainer)(o,{})},98009:function(e,n,l){var a=l(96540),t=l(18312),s=l(71020),i=l(37591),r=l(86469),o=l(74848);class u extends a.Component{constructor(...e){super(...e),this.comment=void 0}_onApprove(e){e.preventDefault(),this.props.approve(this.comment.value).catch(e=>{})}_storageKey(){return`approve-comment-${this.props.preview.id}`}_onInput(){r.Lr.setItem(this._storageKey(),this.comment.value,i.default)}_restoreValue(){return r.Lr.getItem(this._storageKey())||""}render(){return(0,o.jsxs)("div",{className:"clearfix",children:[(0,o.jsx)("div",{className:"form-group mb-3",children:(0,o.jsx)("textarea",{className:"form-control",defaultValue:this._restoreValue(),onInput:()=>this._onInput(),ref:e=>{this.comment=e}})}),(0,o.jsx)("div",{className:"form-group mb-3 float-end ms-auto",children:(0,o.jsx)("input",{type:"submit",className:"btn btn-primary btn-sm",onClick:e=>this._onApprove(e),value:s.default.loc("Approve")})})]})}}n.default=(0,t.createFragmentContainer)(u,{})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.