(function(n,t){"use strict";function f(n,t){return c&&(n=n.toLowerCase(),t=t.toLowerCase()),n===t||l&&!u.test(n)&&!u.test(t)}function e(n){for(var i=n.split(/(\s+|\b)/),t=0;t<i.length-1;t++)!i[t+1]&&i[t+2]&&r.test(i[t])&&r.test(i[t+2])&&(i[t]+=i[t+2],i.splice(t+1,2),t--);return i}function o(n){for(var i=[],t=0;t<n.length;t++)n[t]&&i.push(n[t]);return i}function s(n,t,i,r){for(var s=t.length,h=i.length,u=n.newPos,e=u-r,o=0;u+1<s&&e+1<h&&f(t[u+1],i[e+1]);)u++,e++,o++;return o&&n.components.push({count:o}),n.newPos=u,e}function i(n){return n.join("")}function h(n,t,i){var r=n[n.length-1];r&&r.added===t&&r.removed===i?n[n.length-1]={count:r.count+1,added:t,removed:i}:n.push({count:1,added:t,removed:i})}function a(n,t,r,u){for(var o=0,l=n.length,s=0,h=0,e,a,v,c;o<l;o++)e=n[o],e.removed?(e.value=i(r.slice(h,h+e.count)),h+=e.count,o&&n[o-1].added&&(v=n[o-1],n[o-1]=n[o],n[o]=v)):(!e.added&&u?(a=t.slice(s,s+e.count),a=a.map(function(n,t){var i=r[h+t];return i.length>n.length?i:n}),e.value=i(a)):e.value=i(t.slice(s,s+e.count)),s+=e.count,e.added||(h+=e.count));return c=n[l-1],l>1&&(c.added||c.removed)&&f("",c.value)&&(n[l-2].value+=c.value,n.pop()),n}function v(n){return{newPos:n.newPos,components:n.components.slice(0)}}function y(n,r){function k(){for(var b,k,i=-1*l;i<=l;i+=2){var e,o=u[i-1],y=u[i+1],w=(y?y.newPos:0)-i;if(o&&(u[i-1]=t),b=o&&o.newPos+1<f,k=y&&0<=w&&w<c,!b&&!k){u[i]=t;continue}if(!b||k&&o.newPos<y.newPos?(e=v(y),h(e.components,t,!0)):(e=o,e.newPos++,h(e.components,!0,t)),w=s(e,r,n,i),e.newPos+1>=f&&w+1>=c)return a(e.components,r,n,p.useLongestToken);u[i]=e}l++}var p=this,y;n=o(e(n));r=o(e(r));var f=r.length,c=n.length,l=1,w=f+c,u=[{newPos:-1,components:[]}],b=s(u[0],r,n,0);if(u[0].newPos+1>=f&&b+1>=c)return[{value:i(r),count:r.length}];while(l<=w)if(y=k(),y)return y}var c=!1,l=!1,r=/^[a-zA-Z\u00C0-\u00FF\u00D8-\u00F6\u00F8-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/;n.diff=y})(this.jsDiff=this.jsDiff||{}),function(n){"use strict";function t(n,t,i,r){function f(){var n=r.get();return n.id}function e(){return u}function o(n){return _.isArray(n)?_.some(n,function(n){return u===n}):u===n}function s(n){var r=f();r&&(i.path(""+r+"/"+n),t.scrollTo(0,1),t.scrollTo(0,0))}function h(){return i.path()}function c(n){var t=/^\/\d+\/(\w+)\/?/.exec(n),i=t&&t[1];u=i?i:"details"}var u;return n.$watch(h,c),{getPage:e,isCurrentPage:o,goToPage:s}}n.module("app").service("CaseNavigationService",["$rootScope","$window","$location","CaseService",t])}(angular),function(n,t){"use strict";function i(){function r(i,r){for(var c=t.diff(i,r),f,e=[],o=[],s=[],h=0;h<c.length;h++)f=c[h],f.added?e.push(f):f.removed?o.push(f):u(f,e,o)?(e.push({added:!0,value:f.value,count:f.count}),o.push({removed:!0,value:f.value,count:f.count})):(o.length&&s.push(n(o.splice(0,o.length))),e.length&&s.push(n(e.splice(0,e.length))),s.push(f));return o.length&&s.push(n(o.splice(0,o.length))),e.length&&s.push(n(e.splice(0,e.length))),s}function n(n){return _.reduce(n,function(n,t){return{added:n&&n.added||t.added,removed:n&&n.removed||t.removed,value:(n&&n.value||"")+t.value}})}function u(n,t,r){return(i(t)>2||i(r)>2)&&!/\w+\s+\w+/.test(n.value)?!0:/\w+/.test(n.value)?!1:!0}function i(n){return _.sumBy(n,"count")}function f(n,i){for(var f=t.diff(n,i),r,e=0,o=0,u=0;u<f.length;u++)r=f[u],o+=r.value.length,r.added||r.removed||(e+=r.value.length);return(100*e/o).toFixed(2)}function e(n,i){var r=t.diff(n,i),u=_.filter(r,"added");return u.length}function o(n,i){var r=t.diff(n,i),u=_.filter(r,"removed");return u.length}return{diffCompaction:r,percentDifferent:f,numberOfAdditions:e,numberOfDeletions:o}}n.module("app").service("TextDiffService",[i])}(angular,jsDiff),function(n){"use strict";function t(t,i,r,u,f,e){function l(n){t.subtab=n}function a(){return t.subtab}function s(){return u.get()||{}}function v(){return!!s().hrefChronology}function y(){return!!s().HrefAddPendingChanges}function p(n){var r=s(),t=r.hrefChronology;return t&&n&&(t=t+"?forReport=true"),t&&t!==h&&(h=t,i.get(t).then(function(n){c=n.data})),c.entries||[]}function w(){var n=s();return n.hrefChronologyReport}function o(n){var t=n||{};return t.changes||{}}function b(n){var t=n||{};return t.section||{}}function k(n){var i=n||{},t=i.changes.review||{};return _.isEmpty(t)||(t.isAutoApproved=i.changes.review.reviewedByUserId===0),t}function d(n){var t=o(n),i=b(n);return t.action==="addition"&&i.text!=="CaseCreated"}function g(n){var t=o(n);return t.action==="change"}function nt(n){var t=o(n);return t.action==="deletion"}function tt(n){var u=o(n),t=r.utc(u.dateTime),i=t.clone();return i.startOf("day"),!t.isSame(i)}function it(n){var t=o(n);return t.dateTime}function rt(n){var i=o(n),t=r(i.dateTime);return t.startOf("day"),t.utc(),t}function ut(n){var i=o(n),t=i.user||n.user||{};return append(t.firstName," ",t.lastName)}function ft(n){var t=o(n),i=t.user||n.user||{};return i.hrefProfile}function et(n){var t=o(n),i=t.user||n.user||{};return i.role}function ot(n){var t=o(n);return t.events||[]}function st(n){var t=o(n);return t.noKnownInformationEvents||[]}function ht(n){var t=o(n);return t.context||[]}function ct(n){var t=o(n),i=t.differences||[],r=t.events|[],u=t.noKnownInformationEvents|[];return i.length===0&&r.length===0&&u.length===0}function lt(t){var r=o(t),i=r.differences||[];return n.forEach(i,function(n){n.section=t.section}),i}function at(n){var t=n||{};return t.action==="entry"}function vt(n){var t=n||{};return t.action==="removal"}var h,c={};t.canSeeChronology=v;t.chronology=p;t.getChronologyReportUrl=w;t.canSeeApprovalDenial=y;t.isAddition=d;t.isChange=g;t.isDeletion=nt;t.hasTimeComponent=tt;t.date=it;t.dateComponent=rt;t.username=ut;t.userLink=ft;t.role=et;t.events=ot;t.noKnownInformationEvents=st;t.context=ht;t.noDifferencesOrEvents=ct;t.differences=lt;t.isEntry=at;t.isRemoval=vt;t.review=k;t.caseInfo=s;t.setSubTab=l;t.getSubTab=a;e.isCurrentPage("activities")&&(t.subtab=1);e.isCurrentPage("chronology")&&(t.subtab=2)}n.module("app").controller("commonCaseChronology",["subSection","$http","moment","CaseService","identity","CaseNavigationService",t])}(angular),function(n){"use strict";function t(t,i,r,u,f,e,o,s,h,c,l){function v(){return a().length===0}function y(n){return l(function(t){r.patch(n.review.hrefReview,ot(n.review,n.entry.status),{headers:{"Content-Type":"application/json"}}).then(function(){t([])}).catch(function(i){t([{entry:n.entry,result:i}])})})}function p(n,t){var i=[];return _.remove(t,n),n.entry.status?(n.entry.status==="approved"&&t.forEach(function(r){_.includes(n.review.predecessorHandles,r.review.entityHandle)&&i.push(p(r,t))}),i.length>0?l.all(i).then(function(n){return _.flatMap(n)}).then(function(t){return t.length>0?t:y(n)}):y(n)):l.when([])}function rt(){if(w()){function u(n){for(var r=[],t=_.flatMap(n,function(n){return _.map(n.pendingReviews,function(t){return{entry:n,review:t}})});t.length>0;)r.push(p(t[0],t));return l.all(r).then(function(n){return i.reload(),_.flatMap(n)})}var n=yt(),t=_.filter(n,function(n){return n.section.text==="CaseResolution"&&n.status==="approved"?!0:!1});Array.isArray(t)&&t.length>1?h.openConfirmDialog(c.resolution.multipleResolutionApprovalsMsg,r):r();function r(){u(n).then(function(n){_.isEmpty(n)||s.openDefaultDialog(n,pt)})}}}function ut(){a().forEach(function(n){n.status="approved";n.localizedStatus=c.reviewOutcome.approved})}function ft(){a().forEach(function(n){n.status="denied";n.localizedStatus=c.reviewOutcome.denied})}function et(){a().forEach(function(n){n.status=""})}function ot(n,t){return{id:n.id,reviewOutcome:{name:t}}}function w(){return _.some(a(),function(n){return _.some(n.pendingReviews,function(n){return n.hrefReview})})}function st(){return _.some(a(),function(n){return _.some(n.pendingReviews,function(n){return n.predecessorHandles&&n.predecessorHandles.length>0})})}function ht(n){return _.some(n.pendingReviews,function(n){return n.hrefReview})}function ct(n){return n.status==="approved"?(n.localizedStatus=c.reviewOutcome.approved,!0):!1}function lt(n){return n.status==="denied"?(n.localizedStatus=c.reviewOutcome.denied,!0):!1}function at(n){n.status==="approved"?(n.status=null,b(n)):(n.status="approved",k(n))}function vt(n){n.status==="denied"?(n.status=null,d(n)):(n.status="denied",g(n))}function b(n){var t=a(),i=nt(n);t.forEach(function(n){_.some(n.pendingReviews,i)&&n.status==="approved"&&(n.status=null,b(n))})}function k(n){var t=a(),i=tt(n);t.forEach(function(n){_.some(n.pendingReviews,i)&&n.status!=="approved"&&(n.status="approved",k(n))})}function d(n){var t=a(),i=tt(n);t.forEach(function(n){_.some(n.pendingReviews,i)&&n.status==="denied"&&(n.status=null,d(n))})}function g(n){var t=a(),i=nt(n);t.forEach(function(n){_.some(n.pendingReviews,i)&&n.status!=="denied"&&(n.status="denied",g(n))})}function nt(n){var t=_.map(n.pendingReviews,"entityHandle");return function(n){return _.some(t,function(t){return _.includes(n.predecessorHandles,t)})}}function tt(n){var t=_.flatMap(n.pendingReviews,"predecessorHandles");return function(n){return _.includes(t,n.entityHandle)}}function it(){return t.caseInfo()}function yt(){var t=[];return n.forEach(a(),function(n){_.isEmpty(n.status)||t.push(n)}),t}function a(){var n=it(),t=n.changes||{};return t.entries||[]}function pt(n){var i=it(),t=i.changes||{};t.entries=_.without(t.entries,n)}u("commonCaseChronology",{subSection:t});f.register("Changes",{hide:v});t.pending=a;t.hide=v;t.hasDependencies=st;t.approve=at;t.deny=vt;t.isDenied=lt;t.isApproved=ct;t.canSave=w;t.canReview=ht;t.save=rt;t.cancel=et;t.request={approved:{},denied:{}};t.denyAll=ft;t.approveAll=ut;o.registerChanges(function(){return a().length>0})}n.module("app").filter("capitalize",function(){return function(n){return n.charAt(0).toUpperCase()+n.slice(1)}});n.module("app").controller("commonCaseReview",["subSection","CaseService","$http","$controller","NavigationService","identity","AdminToolService","ReviewModalService","commonModalService","localizedSource","$q",t])}(angular),function(n){"use strict";function t(t,i){function u(n,u){var f={entry:n};t.show({templateUrl:i.reviewModal.toString(),data:f,onResult:r(n,u),onClose:r(n,u)})}function r(t,i){n.forEach(t,function(n){i(n.entry)})}return{openDefaultDialog:u}}n.module("app").service("ReviewModalService",["namusModal","templateUrls",t])}(angular),function(n){"use strict";function t(n,t){var i=this;i.caseNumber=t.getCaseNumber;i.fullName=t.getFullName;i.gender=t.getGender;i.ethnicities=t.getEthnicities;i.status=t.getStatus;i.dateFound=t.getDateFound;i.locationFound=t.getLocationFound;i.maxAge=t.getMaxAge}n.module("app").controller("ChronologySummary",["$scope","SummaryProjection",t])}(angular),function(n){"use strict";function t(n){var t=this;n("commonCaseChronology",{subSection:t})}n.module("app").controller("CaseChronology",["$controller",t])}(angular,jsDiff),function(n){"use strict";function t(n){var t=this;n("commonCaseReview",{subSection:t})}n.module("app").controller("Changes",["$controller",t])}(angular),function(n){"use strict";function t(){function t(t){return _.isArray(t)?"("+_.join(_.map(t,n),", ")+")":n(t)}function n(n){var t=i(n),r=t;return t.hasOwnProperty("from")||t.hasOwnProperty("to")?(t.from===0&&(t.from="0"),t.to===0&&(t.to="0"),r=append(t.from,"-",t.to)):/^\d{4}-[01]\d-[0-3]\d$/.test(t)?r=moment(t).format("MM/DD/YYYY"):/^\d{4}-[01]\d-[0-3]\dT[01]\d:[0-5]\d:[0-5]\d$/.test(t)&&(r=moment(t).format("MM/DD/YYYY h:mm:ss a")),r}function i(n){var t=n||"";return t.localizedName||t.name||t}function r(n,t){var i=n,r,u;return i&&!t.showAll&&(r=i.match(/[\r\n]/),u=r?Math.min(r.index,80):80,i=i.substr(0,u)+"..."),i}return{display:t,getShort:r}}n.module("app").service("ChronologyDisplayService",[t])}(angular),function(n){"use strict";function t(n){this.display=n.display}n.module("app").component("defaultContext",{controller:["ChronologyDisplayService",t],bindings:{context:"<"},templateUrl:["templateUrls",function(n){return n.defaultContext.toString()}]})}(angular),function(n){"use strict";function t(n){this.display=n.display}n.module("app").component("defaultDifference",{controller:["ChronologyDisplayService",t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.defaultDifference.toString()}]})}(angular),function(n){"use strict";function t(){}n.module("app").component("documentContext",{controller:[t],bindings:{context:"<"},templateUrl:["templateUrls",function(n){return n.documentContext.toString()}]})}(angular),function(n){"use strict";function t(){this.getDocumentName=function(n){var u=n||{},r=u.file||{},t=r.fileName||"",i=r.fileExtension||"";return!!t&&!!i&&!_.endsWith(t,i)?"".concat(t,".",i):t}}n.module("app").component("documentDifference",{controller:[t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.documentDifference.toString()}]})}(angular),function(n){"use strict";function t(){this.getDocumentSource=function(){var n=this.attachment||{},t=n.file||{};return t.href};this.getDocumentExtension=function(){var n=this.attachment||{},t=n.file||{};return t.fileExtension||""}}n.module("app").component("documentThumbnail",{controller:[t],bindings:{attachment:"<"},templateUrl:["templateUrls",function(n){return n.documentThumbnail.toString()}]})}(angular),function(n){"use strict";function t(n){this.hasReview=function(){return!_.isEmpty(n.$parent.review.reviewOutcome)}}n.module("app").component("reviewContext",{controller:["$scope",t],bindings:{review:"&",userLink:"&",username:"&"},templateUrl:["templateUrls",function(n){return n.reviewContext.toString()}]})}(angular),function(n){"use strict";function t(){function n(n){var t=n[0]||n||{};return!!t.value.hrefProfile}function t(n){var t=n[0]||n||{};return append(t.firstName," ",t.lastName,", ",t.role)}this.getNameAndRole=t;this.hasLink=n}n.module("app").component("caseContributorContext",{controller:[t],bindings:{context:"<"},templateUrl:["templateUrls",function(n){return n.caseContributorContext.toString()}]})}(angular),function(n){"use strict";function t(){function t(t){var i=t||{};return n.lowercase(i.action)==="entry"}function i(t){var i=t||{};return n.lowercase(i.action)==="difference"}function r(t){var i=t||{};return n.lowercase(i.action)==="removal"}function u(n){var t=n[0]||n||{};return!!t.hrefProfile}function f(n){var t=n[0]||n||{};return append(t.firstName," ",t.lastName,", ",t.role)}this.isEntry=t;this.isDifference=i;this.isRemoval=r;this.getNameAndRole=f;this.hasLink=u}n.module("app").component("caseContributorDifference",{controller:[t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.caseContributorDifference.toString()}]})}(angular),function(n){"use strict";function t(){function n(n){var i=n||{},t=i.property||{};return t.text==="NcicCodes"||t.text==="IafisCodes"}function u(n){var t=n||{};return t.action==="entry"}function f(n){var t=n||{};return t.action==="difference"}function e(n){var t=n||{};return t.action==="removal"}function o(t){return n(t)&&u(t)}function s(t,i){return n(i)&&f(i)}function h(t,i){return n(i)&&e(i)}function t(n,t){if(n){var i=n.split(",");return t==="right"?i.slice(0,5):i.slice(5,10)}return new Array(5)}function i(n,i){var r=n||{},u=r.from||[];return t(u[0],i)}function r(n,i){var r=n||{};return t(r.to,i)}function c(n,t){var u=i(n,t),f=r(n,t);return _.map(u,function(n,t){var i=f[t];return n===i?{unchanged:!0,code:n}:n&&i?{changed:!0,from:n,to:i}:n?{deleted:!0,from:n}:{entered:!0,to:i}})}function l(n,t){var i="fingerprintCodeDiffs_"+t;return n[i]||(n[i]=c(n,t)),n[i]}this.areFingerprintCodesEntered=o;this.areFingerprintCodesChanged=s;this.areFingerprintCodesRemoved=h;this.fingerprintCodesFrom=i;this.fingerprintCodesTo=r;this.fingerprintCodeDiffs=l}n.module("app").component("fingerprintCodesDifference",{controller:[t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.fingerprintCodesDifference.toString()}]})}(angular),function(n){"use strict";function t(){function t(t){var r=t||{},i=r.property||{};return n.lowercase(i.text)==="nciccodes"||n.lowercase(i.text)==="namuscodes"}function f(t){var i=t||{};return n.lowercase(i.action)==="entry"}function e(t){var i=t||{};return n.lowercase(i.action)==="difference"}function o(t){var i=t||{};return n.lowercase(i.action)==="removal"}function s(n){return t(n)&&f(n)}function h(n){return t(n)&&e(n)}function c(n){return t(n)&&o(n)}function i(n,t){if(_.isEmpty(n))return new Array(17);var i=n.split(",");return t==="top"?i.slice(0,16):i.slice(16,33).reverse()}function r(n,t){var r=n||{};return i(r.to,t)}function u(n,t){var r=n||{},u=r.from||[];return i(u[0],t)}function l(n,t){return n[t]||(n[t]=a(n,t)),n[t]}function a(n,t){var i=u(n,t),f=r(n,t);return _.map(i,function(n,t){var i=f[t];return n===i?{unchanged:!0,code:n}:n&&i?{changed:!0,from:n,to:i}:n?{deleted:!0,from:n}:{entered:!0,to:i}})}this.isDentalChartEntered=s;this.isDentalChartChanged=h;this.isDentalChartRemoved=c;this.dentalCodesTo=r;this.dentalCodesFrom=u;this.dentalCodesDiff=l}n.module("app").component("dentalChartDifference",{controller:[t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.dentalChartDifference.toString()}]})}(angular),function(n){"use strict";function t(){}n.module("app").component("imageContext",{controller:[t],bindings:{context:"<"},templateUrl:["templateUrls",function(n){return n.imageContext.toString()}]})}(angular),function(n){"use strict";function t(){this.isUpload=function(){var n=this.difference||{},t=n.property||{};return t.text==="Image"};this.getFrom=function(){var n=this.difference||{};return n.from};this.getTo=function(){var n=this.difference||{};return n.to}}n.module("app").component("imageDifference",{controller:[t],bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.imageDifference.toString()}]})}(angular),function(n){"use strict";function t(){this.getOriginal=function(){var n=this.attachment||{},t=n.files||{};return t.original||{}};this.getThumbnail=function(){var n=this.attachment||{},t=n.files||{};return t.thumbnail||{}};this.getThumbnailWidth=function(){var n=this.getThumbnail();return n.width/16};this.getThumbnailHeight=function(){var n=this.getThumbnail();return n.height/16};this.getOriginalSource=function(){return this.getOriginal().href};this.getThumbnailSource=function(){return this.getThumbnail().href}}n.module("app").component("imageThumbnail",{controller:[t],bindings:{attachment:"<"},templateUrl:["templateUrls",function(n){return n.imageThumbnail.toString()}]})}(angular),function(n){"use strict";function t(n){function t(){this.context.showAll=!this.context.showAll}function i(){var t=n.display(_.get(this,"context.value"));return n.getShort(t,this.context)}this.toggleShowAll=t;this.shortContextValue=i;this.printed===!0&&(this.context.showAll=!0)}n.module("app").component("longFormatContext",{controller:["ChronologyDisplayService",t],bindings:{context:"<",printed:"<"},templateUrl:["templateUrls",function(n){return n.longFormatContext.toString()}]})}(angular),function(n){"use strict";function t(n,t){function i(){this.difference.showAll=!this.difference.showAll}function r(){var t=n.display(_.get(this,"difference.to"));return n.getShort(t,this.difference)}function u(){var t=n.display(_.get(this,"difference.from[0]"));return n.getShort(t,this.difference)}function f(){var n=this.difference||{};return n.diffs||(n.diffs=e(this.difference))}function e(n){var i=_.get(n,"from[0]"),r=_.get(n,"to");return t.diffCompaction(i,r)}this.toggleShowAll=i;this.shortTo=r;this.shortFrom=u;this.diff=f;this.printed===!0&&(this.difference.showAll=!0)}n.module("app").component("longFormatDifference",{controller:["ChronologyDisplayService","TextDiffService",t],bindings:{difference:"<",printed:"<"},templateUrl:["templateUrls",function(n){return n.longFormatDifference.toString()}]})}(angular),function(n){"use strict";function t(){function t(){var t=n.difference.to||n.difference.from[0];return"".concat("/UnidentifiedPersons/Case#/",t)}function i(){var t=n.difference.to||n.difference.from[0];return"".concat("UP",t)}function r(){var t=n.difference.to||n.difference.from[0];return"".concat("/MissingPersons/Case#/",t)}function u(){var t=n.difference.to||n.difference.from[0];return"".concat("MP",t)}var n=this;Object.defineProperty(n,"unidentifiedPersonsCaseHref",{get:t});Object.defineProperty(n,"unidentifiedPersonsCaseLinkText",{get:i});Object.defineProperty(n,"missingPersonsCaseHref",{get:r});Object.defineProperty(n,"missingPersonsCaseLinkText",{get:u});n.isEntry=function(n){var t=n||{};return t.action==="entry"};n.isRemoval=function(n){var t=n||{};return t.action==="removal"}}n.module("app").component("exclusionInternalCaseLink",{controller:[t],controllerAs:"vm",bindings:{difference:"<"},templateUrl:["templateUrls",function(n){return n.exclusionInternalCaseLink.toString()}]})}(angular),function(n){"use strict";function t(n,t){function i(n){var r=u(n),i=t.display(r);return f(i)||/[\r\n]/.test(i)}return{restrict:"E",replace:!1,template:"",scope:{},bindToController:{context:"&"},controllerAs:"list",controller:function(){},link:function(t,u,f,c){var a=c.context(),v=[{tag:"long-format-context",predicate:i},{tag:"image-context",predicate:e},{tag:"document-context",predicate:s},{tag:"case-contributor-context",predicate:o},{tag:"default-context",predicate:h}],y=_.find(v,function(n){return n.predicate(a)}),l=y.tag,p=_.reduce(f,r,"");u.append(n("<"+l+p+"><\/"+l+">")(t.$parent))}}}function i(n){return n.replace(/[A-Z]|\d+/g,"-$&").toLowerCase()}function r(n,t,r){var u=n;return/^\$/.test(r)||(u+=" "+i(r)+'="'+t+'"'),u}function u(n){var t=n||{};return t.value}function f(n){var t=n||"";return t.length>110}function e(n){var t=n||{},i=t.property||{};return i.text==="Image"}function o(t){var i=t||{},r=i.property||{};return n.lowercase(r.text)==="person"}function s(n){var t=n||{},i=t.property||{};return i.text==="Document"}function h(){return!0}n.module("app").directive("chronologyContext",["$compile","ChronologyDisplayService",t])}(angular),function(n){"use strict";function i(n,i){function r(n){var r=f(n),u=e(n),o=i.display(r),s=i.display(u);return!_.isArray(r)&&!_.isArray(u)&&(t(o,n.section)||t(s,n.section)||/[\r\n]/.test(o)||/[\r\n]/.test(s))}return{restrict:"E",replace:!1,template:"",scope:{},bindToController:{difference:"&"},controllerAs:"list",controller:function(){},link:function(t,i,f,e){var p=e.difference(),w=[{tag:"long-format-difference",predicate:r},{tag:"image-difference",predicate:o},{tag:"document-difference",predicate:s},{tag:"case-contributor-difference",predicate:h},{tag:"dental-chart-difference",predicate:c},{tag:"fingerprint-codes-difference",predicate:l},{tag:"exclusion-internal-case-link",predicate:a},{tag:"default-difference",predicate:v}],b=_.find(w,function(n){return n.predicate(p)}),y=b.tag,k=_.reduce(f,u,"");i.append(n("<"+y+k+"><\/"+y+">")(t.$parent))}}}function r(n){return n.replace(/[A-Z]|\d+/g,"-$&").toLowerCase()}function u(n,t,i){var u=n;return/^\$/.test(i)||(u+=" "+r(i)+'="'+t+'"'),u}function f(n){var t=n||{},i=t.from||[];return _.head(i)}function e(n){var t=n||{};return t.to}function t(t,i){var r=t||"",u=n.lowercase(i.text);return r.length>110&&(u==="dental"||u==="fingerprints")&&r.length>255}function o(n){var i=n||{},t=i.property||{};return t.text==="Image"||t.text==="DefaultImage"}function s(n){var t=n||{},i=t.property||{};return i.text==="Document"}function h(t){var i=t||{},r=i.property||{};return n.lowercase(i.section.text)==="casecontributors"&&n.lowercase(r.text)==="person"}function c(t){var i=t||{},r=i.property||{};return n.lowercase(i.section.text)==="dental"&&(r.text==="NcicCodes"||r.text==="NamUsCodes")}function l(t){var i=t||{},r=i.property||{};return n.lowercase(i.section.text)==="fingerprints"&&r.text==="NcicCodes"||r.text==="IafisCodes"}function a(n){var t=n||{},i=t.property||{};return i.text==="NamUsCase"}function v(){return!0}n.module("app").directive("chronologyDifference",["$compile","ChronologyDisplayService",i])}(angular),function(n){"use strict";function t(n){return{restrict:"E",replace:!1,templateUrl:n.event.toString(),scope:{event:"="}}}n.module("app").directive("chronologyEvent",["templateUrls",t])}(angular),function(n){"use strict";function t(n){return{restrict:"E",replace:!1,templateUrl:n.noKnownInformationEvent.toString(),scope:{event:"="}}}n.module("app").directive("chronologyNoKnownInformationEvent",["templateUrls",t])}(angular)