{"version":3,"sources":["../js/Annotations/AnnotationData.js"],"names":["g_oAnnotationData","AnnotationData","prototype","renderAnnotationData","annotationId","annotationType","annotationData","oAnnotationDataHTML","$","each","AdditionalData","key","value","renderAnnotationDataItem","html","addClass","slideDown","scrollAnnotationData","closeAnnotationData","bAnimate","iAnimationTime","slideUp","removeClass","iAnnotationDataPosition","position","top","animate","scrollTop","window"],"mappings":"AAaA,IAAIA,kBAAoB,IAEvB,WACA,aAKA,SAASC,kBAQTA,eAAeC,UAAUC,qBAAuB,SAAUC,aAAcC,eAAgBC,gBAGvF,IAAIC,oBAAsB,GAG1BA,qBAAuB,YAAcH,aAAe,mEACpDG,qBAAuB,cAAgBH,aAAe,0IACtDG,qBAAuB,SAGvBC,EAAEC,KAAKH,eAAeI,eAAgB,SAAUC,IAAKC,OACpDL,qBAAuBP,kBAAkBa,yBAAyBF,IAAKC,SAIxEJ,EAAE,IAAMJ,aAAe,4BAA4BU,KAAKP,qBAGxDC,EAAE,IAAMJ,aAAe,4BAA4BW,SAAS,2BAG5DP,EAAE,IAAMJ,aAAe,4BAA4BY,UAAU,GAAI,GAAI,WAAchB,kBAAkBiB,qBAAqBb,iBAQ3HH,eAAeC,UAAUW,yBAA2B,SAAUF,IAAKC,OAClE,MAAO,gFAAkFD,IAAM,YAAcC,MAAQ,gBAOtHX,eAAeC,UAAUgB,oBAAsB,SAAUd,aAAce,UAGtE,IAAIC,eAAiBD,SAAW,IAAM,EAGtCX,EAAE,IAAMJ,aAAe,4BAA4BiB,QAAQD,eAAgB,GAAI,WAAcZ,EAAE,IAAMJ,aAAe,4BAA4BkB,YAAY,8BAO7JrB,eAAeC,UAAUe,qBAAuB,SAAUb,cAGzD,IAAImB,wBAA0Bf,EAAE,IAAMJ,aAAe,4BAA4BoB,WAAWC,IAG5FF,yBAA2B,GAG3Bf,EAAE,wBAAwBkB,QAAQ,CAAEC,UAAW,KAAOJ,wBAA0B,QAMjFK,OAAO3B,eAAiBA,eAhFzB","file":"AnnotationData-d528d8bab5.js","sourcesContent":["/*\r\n* Copyright (c) 2025 SGS Europe. All rights reserved.\r\n*\r\n* This program is the CONFIDENTIAL and PROPRIETARY property of SGS Europe.\r\n* Any unauthorised use, reproduction, or transfer of this program is strictly\r\n* prohibited.\r\n*\r\n* File Name: AnnotationData.js\r\n*\r\n* Description: JavaScript code for the annotation data module.\r\n*\r\n*/\r\n\r\nvar g_oAnnotationData = {};\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Create the Annotation Data object.\r\n\t */\r\n\tfunction AnnotationData() {}\r\n\r\n\t/**\r\n\t * Renders the data for an annotation.\r\n\t * @param {int} annotationId - The id of the annotation.\r\n\t * @param {int} annotationType - The annotation type.\r\n\t * @param {object} annotationData - The annotation data object.\r\n\t */\r\n\tAnnotationData.prototype.renderAnnotationData = function (annotationId, annotationType, annotationData) {\r\n\r\n\t\t// Build up the HTML for the annotation data.\r\n\t\tvar oAnnotationDataHTML = \"\";\r\n\t\t\r\n\t\t// Create a div for closing the annotation data.\r\n\t\toAnnotationDataHTML += \"
\";\r\n\t\toAnnotationDataHTML += \"\";\r\n\t\toAnnotationDataHTML += \"
\";\r\n\r\n\t\t// Loop through each of the annotation additional data entries.\r\n\t\t$.each(annotationData.AdditionalData, function (key, value) {\r\n\t\t\toAnnotationDataHTML += g_oAnnotationData.renderAnnotationDataItem(key, value);\r\n\t\t});\r\n\r\n\t\t// Add the annotation data html to the container.\r\n\t\t$(\"#\" + annotationId + \"_annotationDataContainer\").html(oAnnotationDataHTML);\r\n\r\n\t\t// Add the display class to the annotation data container.\r\n\t\t$(\"#\" + annotationId + \"_annotationDataContainer\").addClass(\"annotationDataContainer\");\r\n\r\n\t\t// Show the content of the annotation data container.\r\n\t\t$(\"#\" + annotationId + \"_annotationDataContainer\").slideDown(\"\", \"\", function () { g_oAnnotationData.scrollAnnotationData(annotationId); });\r\n\t};\r\n\r\n\t/**\r\n\t * Renders an annotation data item.\r\n\t * @param {string} key - The item key.\r\n\t * @param {string} value - The item value.\r\n\t */\r\n\tAnnotationData.prototype.renderAnnotationDataItem = function (key, value) {\r\n\t\treturn \"
\" + key + \"
\" + value + \"
\";\r\n\t};\r\n\r\n\t/**\r\n\t * Closes the data for an annotation.\r\n\t * @param {int} annotationId - The id of the annotation.\r\n\t */\r\n\tAnnotationData.prototype.closeAnnotationData = function (annotationId, bAnimate) {\r\n\r\n\t\t// Determine the animation time.\r\n\t\tvar iAnimationTime = bAnimate ? 400 : 0;\r\n\r\n\t\t// Close the data for the annotation, then remove the display class for the annotation data container.\r\n\t\t$(\"#\" + annotationId + \"_annotationDataContainer\").slideUp(iAnimationTime, \"\", function () { $(\"#\" + annotationId + \"_annotationDataContainer\").removeClass(\"annotationDataContainer\"); });\r\n\t};\r\n\r\n\t/**\r\n\t * Scrolls to the data for an annotation.\r\n\t * @param {int} annotationId - The id of the annotation.\r\n\t */\r\n\tAnnotationData.prototype.scrollAnnotationData = function (annotationId) {\r\n\r\n\t\t// Get the position of the annotation data container.\r\n\t\tvar iAnnotationDataPosition = $(\"#\" + annotationId + \"_annotationDataContainer\").position().top;\r\n\r\n\t\t// Remove 60px for the height of the divAnnDiv_Header and remove 20px of padding.\r\n\t\tiAnnotationDataPosition -= 60;\r\n\r\n\t\t// Scroll the annotation data into view.\r\n\t\t$(\"#divAnnDiv_ListItems\").animate({ scrollTop: \"+=\" + iAnnotationDataPosition + \"px\" });\r\n\t};\r\n\r\n\t/**\r\n\t * Add the AnnotationData object to the window.\r\n\t */\r\n\twindow.AnnotationData = AnnotationData;\r\n\r\n}());"]}