From 3a2c22107168519f41e97e9bb79cecb547fbef6f Mon Sep 17 00:00:00 2001 From: tinohager Date: Thu, 7 Mar 2024 15:08:56 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tinohage?= =?UTF-8?q?r/word-addin@3dca24ce382b2c959da5d6f10aa12fc0993b22b7=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taskpane.js | 2 +- taskpane.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/taskpane.js b/taskpane.js index 83f2a28..ac144e2 100644 --- a/taskpane.js +++ b/taskpane.js @@ -1,2 +1,2 @@ -!function(){"use strict";var e,t,o,n,r={14385:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),t.hash&&(e+=t.hash),t.maybeNeedQuotes&&/[\t\n\f\r "'=<>`]/.test(e)?'"'.concat(e,'"'):e):e}},98362:function(e,t,o){e.exports=o.p+"assets/logo-filled.png"},58394:function(e,t,o){e.exports=o.p+"1fda685b81e1123773f6.css"}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return r[e](o,o.exports,c),o.exports}c.m=r,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}(),c.b=document.baseURI||self.location.href,function(){async function e(){return console.log("Run V1"),await Word.run((async e=>{let t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const o=e.document.body.paragraphs;o.load(["text"]),await e.sync(),document.getElementById("progressbar").style.width="10%";let n=performance.now();console.log(`Execution time load paragraphs: ${n-t} ms`),t=performance.now();const r=[];for(let e=0;e2&&(t.items[1].font.bold=!0,t.items[2].font.bold=!0)}catch(e){console.error("error on process - "+e)}}document.getElementById("progressbar").style.width="60%",n=performance.now(),console.log(`Execution time update word formatting: ${n-t} ms`),t=performance.now(),await e.sync(),n=performance.now(),console.log(`Execution time context sync: ${n-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}async function t(){return console.log("Run V2"),await Word.run((async e=>{const t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const o=e.document.body.paragraphs;o.load("text"),await e.sync(),document.getElementById("progressbar").style.width="10%";for(let t=0;t2&&(t.items[1].font.bold=!0,t.items[2].font.bold=!0)}}}await e.sync();const n=performance.now();console.log(`Execution time: ${n-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}Office.onReady((o=>{o.host===Office.HostType.Word&&(document.getElementById("sideload-msg").style.display="none",document.getElementById("app-body").style.display="flex",document.getElementById("run1").onclick=e,document.getElementById("run2").onclick=t)}))}(),e=c(14385),t=c.n(e),o=new URL(c(58394),c.b),n=new URL(c(98362),c.b),t()(o),t()(n)}(); +!function(){"use strict";var e,t,o,n,r={14385:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),t.hash&&(e+=t.hash),t.maybeNeedQuotes&&/[\t\n\f\r "'=<>`]/.test(e)?'"'.concat(e,'"'):e):e}},98362:function(e,t,o){e.exports=o.p+"assets/logo-filled.png"},58394:function(e,t,o){e.exports=o.p+"1fda685b81e1123773f6.css"}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return r[e](o,o.exports,c),o.exports}c.m=r,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}(),c.b=document.baseURI||self.location.href,function(){async function e(){return console.log("Run V1"),await Word.run((async e=>{let t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const o=e.document.body.paragraphs;o.load(["text","items"]),await e.sync(),document.getElementById("progressbar").style.width="10%";let n=performance.now();console.log(`Execution time load paragraphs: ${n-t} ms`),t=performance.now();const r=[];for(let e=0;e2&&(t.items[1].font.bold=!0,t.items[2].font.bold=!0)}catch(e){console.error("error on process - "+e)}}document.getElementById("progressbar").style.width="60%",n=performance.now(),console.log(`Execution time update word formatting: ${n-t} ms`),t=performance.now(),await e.sync(),n=performance.now(),console.log(`Execution time context sync: ${n-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}async function t(){return console.log("Run V2"),await Word.run((async e=>{const t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const o=e.document.body.paragraphs;o.load(["text","items"]),await e.sync(),document.getElementById("progressbar").style.width="10%";for(let t=0;t2&&(t.items[1].font.bold=!0,t.items[2].font.bold=!0)}}}await e.sync();const n=performance.now();console.log(`Execution time: ${n-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}Office.onReady((o=>{o.host===Office.HostType.Word&&(document.getElementById("sideload-msg").style.display="none",document.getElementById("app-body").style.display="flex",document.getElementById("run1").onclick=e,document.getElementById("run2").onclick=t)}))}(),e=c(14385),t=c.n(e),o=new URL(c(58394),c.b),n=new URL(c(98362),c.b),t()(o),t()(n)}(); //# sourceMappingURL=taskpane.js.map \ No newline at end of file diff --git a/taskpane.js.map b/taskpane.js.map index 54e8c76..4e384d9 100644 --- a/taskpane.js.map +++ b/taskpane.js.map @@ -1 +1 @@ -{"version":3,"file":"taskpane.js","mappings":"iCAEIA,EACAC,E,qBCDJC,EAAOC,QAAU,SAAUC,EAAKC,GAM9B,OALKA,IAEHA,EAAU,CAAC,GAGRD,GAKLA,EAAME,OAAOF,EAAIG,WAAaH,EAAII,QAAUJ,GAExCC,EAAQI,OAEVL,GAAOC,EAAQI,MAGbJ,EAAQK,iBAAmB,oBAAoBC,KAAKP,GAC/C,IAAKQ,OAAOR,EAAK,KAGnBA,GAfEA,CAgBX,C,iICxBIS,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CAGAW,EAAoBK,EAAID,ECxBxBJ,EAAoBM,EAAI,SAASlB,GAChC,IAAImB,EAASnB,GAAUA,EAAOK,WAC7B,WAAa,OAAOL,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAY,EAAoBQ,EAAED,EAAQ,CAAEE,EAAGF,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AAK,IAAIC,EAAI,EAAGA,EAAIN,EAAqBH,MAAM7B,OAAQsC,IAAK,CAC1D,MAEMC,EAFYP,EAAqBH,MAAMS,GAElBL,WAAWC,MAAM,CAAC,KAG7CK,EAASd,KAAK,SAEdY,EAAUF,KAAKI,EACjB,CAEA,UACQhB,EAAQG,MAChB,CAAE,MAAOU,GACPzB,QAAQyB,MAAM,mBAAqBA,GACnC,QACF,CAEA,IAAK,IAAIE,EAAI,EAAGA,EAAID,EAAUrC,OAAQsC,IAAK,CACzC,MAAMC,EAAWF,EAAUC,GAEvBC,GACEA,EAASV,MAAM7B,OAAS,IAC1BuC,EAASV,MAAM,GAAGW,KAAKC,MAAO,EAC9BF,EAASV,MAAM,GAAGW,KAAKC,MAAO,EAGpC,CACF,CACF,OAGMlB,EAAQG,OAEd,MAAMC,EAAMX,YAAYC,MACxBN,QAAQC,IAAK,mBAAkBe,EAAMZ,QAErCpB,SAASuB,eAAe,eAAeC,MAAME,MAAQ,OACrD1B,SAASuB,eAAe,eAAeC,MAAMC,QAAU,MAAM,GAEjE,CA9LAwB,OAAOC,SAASC,IACVA,EAAKC,OAASH,OAAOI,SAASnC,OAChClB,SAASuB,eAAe,gBAAgBC,MAAMC,QAAU,OACxDzB,SAASuB,eAAe,YAAYC,MAAMC,QAAU,OACpDzB,SAASuB,eAAe,QAAQ+B,QAAUvC,EAC1Cf,SAASuB,eAAe,QAAQ+B,QAAUP,EAC5C,G,wBTXE5F,EAA6B,IAAIoG,IAAI,cACrCnG,EAA6B,IAAImG,IAAI,cAEH,IAAyCpG,GACzC,IAAyCC,E","sources":["webpack://office-addin-taskpane/./src/taskpane/taskpane.html","webpack://office-addin-taskpane/./node_modules/html-loader/dist/runtime/getUrl.js","webpack://office-addin-taskpane/webpack/bootstrap","webpack://office-addin-taskpane/webpack/runtime/compat get default export","webpack://office-addin-taskpane/webpack/runtime/define property getters","webpack://office-addin-taskpane/webpack/runtime/global","webpack://office-addin-taskpane/webpack/runtime/hasOwnProperty shorthand","webpack://office-addin-taskpane/webpack/runtime/publicPath","webpack://office-addin-taskpane/webpack/runtime/jsonp chunk loading","webpack://office-addin-taskpane/./src/taskpane/taskpane.ts"],"sourcesContent":["// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"./taskpane.css\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../assets/logo-filled.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar code = \" Contoso Task Pane Add-in <\" + \"script src=\\\"https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js\\\"><\" + \"/script>
\\\"Contoso\\\"

AddInn

Please sideload your add-in to see app body.

Run V1 Run V2

\";\n// Exports\nexport default code;","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n if (!url) {\n return url;\n } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n url = String(url.__esModule ? url.default : url);\n\n if (options.hash) {\n // eslint-disable-next-line no-param-reassign\n url += options.hash;\n }\n\n if (options.maybeNeedQuotes && /[\\t\\n\\f\\r \"'=<>`]/.test(url)) {\n return \"\\\"\".concat(url, \"\\\"\");\n }\n\n return url;\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t926: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// no jsonp function","/*\n * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n * See LICENSE in the project root for license information.\n */\n\n/* global document, Office, Word */\n\nOffice.onReady((info) => {\n if (info.host === Office.HostType.Word) {\n document.getElementById(\"sideload-msg\").style.display = \"none\";\n document.getElementById(\"app-body\").style.display = \"flex\";\n document.getElementById(\"run1\").onclick = run1;\n document.getElementById(\"run2\").onclick = run2;\n }\n});\n\nexport async function run1() {\n console.log(\"Run V1\");\n return await Word.run(async (context) => {\n let start = performance.now();\n\n document.getElementById(\"progressbox\").style.display = \"block\";\n document.getElementById(\"progressbar\").style.width = \"0%\";\n\n const paragraphs = context.document.body.paragraphs;\n\n // load text\n //paragraphs.load(\"$all\");\n paragraphs.load([\"text\"]);\n await context.sync();\n\n document.getElementById(\"progressbar\").style.width = \"10%\";\n\n let end = performance.now();\n console.log(`Execution time load paragraphs: ${end - start} ms`);\n start = performance.now();\n\n const wordsRangeCollections = [];\n\n for (let i = 0; i < paragraphs.items.length; i++) {\n const paragraph = paragraphs.items[i];\n\n // only process if text available\n if (paragraph.text) {\n const wordsRangeCollection = paragraph.getRange().split([\" \"]);\n\n wordsRangeCollection.load(\"$none\");\n wordsRangeCollections.push(wordsRangeCollection);\n }\n }\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync2 - \" + error);\n }\n\n end = performance.now();\n console.log(`Execution time load wordsRangeCollections: ${end - start} ms`);\n start = performance.now();\n\n const wordChars = [];\n\n for (let i = 0; i < wordsRangeCollections.length; i++) {\n const wordsRangeCollection = wordsRangeCollections[i];\n\n for (let j = 0; j < wordsRangeCollection.items.length; j++) {\n const wordRange = wordsRangeCollection.items[j];\n\n const wordChar = wordRange.getRange().split([\"\"]);\n\n wordChar.load(\"$none\");\n wordChars.push(wordChar);\n //wordChar.untrack();\n }\n }\n\n document.getElementById(\"progressbar\").style.width = \"30%\";\n\n end = performance.now();\n console.log(`Execution time load wordChars: ${end - start} ms`);\n start = performance.now();\n\n document.getElementById(\"progressbar\").style.width = \"40%\";\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync2 - \" + error);\n }\n\n document.getElementById(\"progressbar\").style.width = \"50%\";\n\n for (let j = 0; j < wordChars.length; j++) {\n const wordChar = wordChars[j];\n try {\n if (wordChar) {\n if (wordChar.items.length > 2) {\n wordChar.items[1].font.bold = true;\n wordChar.items[2].font.bold = true;\n }\n }\n } catch (error) {\n console.error(\"error on process - \" + error);\n }\n }\n\n // Synchronize the document state.\n\n document.getElementById(\"progressbar\").style.width = \"60%\";\n\n end = performance.now();\n console.log(`Execution time update word formatting: ${end - start} ms`);\n start = performance.now();\n\n await context.sync();\n\n end = performance.now();\n console.log(`Execution time context sync: ${end - start} ms`);\n\n document.getElementById(\"progressbar\").style.width = \"100%\";\n document.getElementById(\"progressbox\").style.display = \"none\";\n });\n}\n\nexport async function run2() {\n console.log(\"Run V2\");\n return await Word.run(async (context) => {\n const start = performance.now();\n\n document.getElementById(\"progressbox\").style.display = \"block\";\n document.getElementById(\"progressbar\").style.width = \"0%\";\n\n const paragraphs = context.document.body.paragraphs;\n\n // load text\n //paragraphs.load(\"$all\");\n paragraphs.load(\"text\");\n await context.sync();\n\n document.getElementById(\"progressbar\").style.width = \"10%\";\n\n for (let i = 0; i < paragraphs.items.length; i++) {\n const paragraph = paragraphs.items[i];\n\n const percentage = (100 * i) / paragraphs.items.length;\n document.getElementById(\"progressbar\").style.width = percentage + \"%\";\n\n // only process if text available\n if (paragraph.text) {\n const wordsRangeCollection = paragraph.getRange().split([\" \"]);\n wordsRangeCollection.load(\"$none\");\n\n await wordsRangeCollection.context.sync();\n\n const wordChars = [];\n\n for (let j = 0; j < wordsRangeCollection.items.length; j++) {\n const wordRange = wordsRangeCollection.items[j];\n\n const wordChar = wordRange.getRange().split([\"\"]);\n\n //wordChar.load(\"font\");\n wordChar.load(\"$none\");\n\n wordChars.push(wordChar);\n }\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync - \" + error);\n continue;\n }\n\n for (let j = 0; j < wordChars.length; j++) {\n const wordChar = wordChars[j];\n\n if (wordChar) {\n if (wordChar.items.length > 2) {\n wordChar.items[1].font.bold = true;\n wordChar.items[2].font.bold = true;\n }\n }\n }\n }\n }\n\n // Synchronize the document state.\n await context.sync();\n\n const end = performance.now();\n console.log(`Execution time: ${end - start} ms`);\n\n document.getElementById(\"progressbar\").style.width = \"100%\";\n document.getElementById(\"progressbox\").style.display = \"none\";\n });\n}\n"],"names":["___HTML_LOADER_IMPORT_0___","___HTML_LOADER_IMPORT_1___","module","exports","url","options","String","__esModule","default","hash","maybeNeedQuotes","test","concat","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","d","a","definition","key","o","Object","defineProperty","enumerable","get","g","globalThis","this","Function","e","window","obj","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","length","i","Error","replace","p","b","baseURI","self","href","async","run1","console","log","Word","run","start","performance","now","getElementById","style","display","width","paragraphs","context","body","load","sync","end","wordsRangeCollections","items","paragraph","text","wordsRangeCollection","getRange","split","push","error","wordChars","j","wordChar","font","bold","run2","percentage","Office","onReady","info","host","HostType","onclick","URL"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"taskpane.js","mappings":"iCAEIA,EACAC,E,qBCDJC,EAAOC,QAAU,SAAUC,EAAKC,GAM9B,OALKA,IAEHA,EAAU,CAAC,GAGRD,GAKLA,EAAME,OAAOF,EAAIG,WAAaH,EAAII,QAAUJ,GAExCC,EAA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U,MAAM,GAEjE,CA9LAwB,OAAOC,SAASC,IACVA,EAAKC,OAASH,OAAOI,SAASnC,OAChClB,SAASuB,eAAe,gBAAgBC,MAAMC,QAAU,OACxDzB,SAASuB,eAAe,YAAYC,MAAMC,QAAU,OACpDzB,SAASuB,eAAe,QAAQ+B,QAAUvC,EAC1Cf,SAASuB,eAAe,QAAQ+B,QAAUP,EAC5C,G,wBTXE5F,EAA6B,IAAIoG,IAAI,cACrCnG,EAA6B,IAAImG,IAAI,cAEH,IAAyCpG,GACzC,IAAyCC,E","sources":["webpack://office-addin-taskpane/./src/taskpane/taskpane.html","webpack://office-addin-taskpane/./node_modules/html-loader/dist/runtime/getUrl.js","webpack://office-addin-taskpane/webpack/bootstrap","webpack://office-addin-taskpane/webpack/runtime/compat get default export","webpack://office-addin-taskpane/webpack/runtime/define property getters","webpack://office-addin-taskpane/webpack/runtime/global","webpack://office-addin-taskpane/webpack/runtime/hasOwnProperty shorthand","webpack://office-addin-taskpane/webpack/runtime/publicPath","webpack://office-addin-taskpane/webpack/runtime/jsonp chunk loading","webpack://office-addin-taskpane/./src/taskpane/taskpane.ts"],"sourcesContent":["// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"./taskpane.css\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../assets/logo-filled.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar code = \" Contoso Task Pane Add-in <\" + \"script src=\\\"https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js\\\"><\" + \"/script>
\\\"Contoso\\\"

AddInn

Please sideload your add-in to see app body.

Run V1 Run V2

\";\n// Exports\nexport default code;","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n if (!url) {\n return url;\n } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n url = String(url.__esModule ? url.default : url);\n\n if (options.hash) {\n // eslint-disable-next-line no-param-reassign\n url += options.hash;\n }\n\n if (options.maybeNeedQuotes && /[\\t\\n\\f\\r \"'=<>`]/.test(url)) {\n return \"\\\"\".concat(url, \"\\\"\");\n }\n\n return url;\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t926: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// no jsonp function","/*\n * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n * See LICENSE in the project root for license information.\n */\n\n/* global document, Office, Word */\n\nOffice.onReady((info) => {\n if (info.host === Office.HostType.Word) {\n document.getElementById(\"sideload-msg\").style.display = \"none\";\n document.getElementById(\"app-body\").style.display = \"flex\";\n document.getElementById(\"run1\").onclick = run1;\n document.getElementById(\"run2\").onclick = run2;\n }\n});\n\nexport async function run1() {\n console.log(\"Run V1\");\n return await Word.run(async (context) => {\n let start = performance.now();\n\n document.getElementById(\"progressbox\").style.display = \"block\";\n document.getElementById(\"progressbar\").style.width = \"0%\";\n\n const paragraphs = context.document.body.paragraphs;\n\n // load text\n //paragraphs.load(\"$all\");\n paragraphs.load([\"text\", \"items\"]);\n await context.sync();\n\n document.getElementById(\"progressbar\").style.width = \"10%\";\n\n let end = performance.now();\n console.log(`Execution time load paragraphs: ${end - start} ms`);\n start = performance.now();\n\n const wordsRangeCollections = [];\n\n for (let i = 0; i < paragraphs.items.length; i++) {\n const paragraph = paragraphs.items[i];\n\n // only process if text available\n if (paragraph.text) {\n const wordsRangeCollection = paragraph.getRange().split([\" \"]);\n\n wordsRangeCollection.load(\"$none\");\n wordsRangeCollections.push(wordsRangeCollection);\n }\n }\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync2 - \" + error);\n }\n\n end = performance.now();\n console.log(`Execution time load wordsRangeCollections: ${end - start} ms`);\n start = performance.now();\n\n const wordChars = [];\n\n for (let i = 0; i < wordsRangeCollections.length; i++) {\n const wordsRangeCollection = wordsRangeCollections[i];\n\n for (let j = 0; j < wordsRangeCollection.items.length; j++) {\n const wordRange = wordsRangeCollection.items[j];\n\n const wordChar = wordRange.getRange().split([\"\"]);\n\n wordChar.load(\"$none\");\n wordChars.push(wordChar);\n //wordChar.untrack();\n }\n }\n\n document.getElementById(\"progressbar\").style.width = \"30%\";\n\n end = performance.now();\n console.log(`Execution time load wordChars: ${end - start} ms`);\n start = performance.now();\n\n document.getElementById(\"progressbar\").style.width = \"40%\";\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync2 - \" + error);\n }\n\n document.getElementById(\"progressbar\").style.width = \"50%\";\n\n for (let j = 0; j < wordChars.length; j++) {\n const wordChar = wordChars[j];\n try {\n if (wordChar) {\n if (wordChar.items.length > 2) {\n wordChar.items[1].font.bold = true;\n wordChar.items[2].font.bold = true;\n }\n }\n } catch (error) {\n console.error(\"error on process - \" + error);\n }\n }\n\n // Synchronize the document state.\n\n document.getElementById(\"progressbar\").style.width = \"60%\";\n\n end = performance.now();\n console.log(`Execution time update word formatting: ${end - start} ms`);\n start = performance.now();\n\n await context.sync();\n\n end = performance.now();\n console.log(`Execution time context sync: ${end - start} ms`);\n\n document.getElementById(\"progressbar\").style.width = \"100%\";\n document.getElementById(\"progressbox\").style.display = \"none\";\n });\n}\n\nexport async function run2() {\n console.log(\"Run V2\");\n return await Word.run(async (context) => {\n const start = performance.now();\n\n document.getElementById(\"progressbox\").style.display = \"block\";\n document.getElementById(\"progressbar\").style.width = \"0%\";\n\n const paragraphs = context.document.body.paragraphs;\n\n // load text\n //paragraphs.load(\"$all\");\n paragraphs.load([\"text\", \"items\"]);\n await context.sync();\n\n document.getElementById(\"progressbar\").style.width = \"10%\";\n\n for (let i = 0; i < paragraphs.items.length; i++) {\n const paragraph = paragraphs.items[i];\n\n const percentage = (100 * i) / paragraphs.items.length;\n document.getElementById(\"progressbar\").style.width = percentage + \"%\";\n\n // only process if text available\n if (paragraph.text) {\n const wordsRangeCollection = paragraph.getRange().split([\" \"]);\n wordsRangeCollection.load(\"$none\");\n\n await wordsRangeCollection.context.sync();\n\n const wordChars = [];\n\n for (let j = 0; j < wordsRangeCollection.items.length; j++) {\n const wordRange = wordsRangeCollection.items[j];\n\n const wordChar = wordRange.getRange().split([\"\"]);\n\n //wordChar.load(\"font\");\n wordChar.load(\"$none\");\n\n wordChars.push(wordChar);\n }\n\n try {\n await context.sync();\n } catch (error) {\n console.error(\"error on sync - \" + error);\n continue;\n }\n\n for (let j = 0; j < wordChars.length; j++) {\n const wordChar = wordChars[j];\n\n if (wordChar) {\n if (wordChar.items.length > 2) {\n wordChar.items[1].font.bold = true;\n wordChar.items[2].font.bold = true;\n }\n }\n }\n }\n }\n\n // Synchronize the document state.\n await context.sync();\n\n const end = performance.now();\n console.log(`Execution time: ${end - start} ms`);\n\n document.getElementById(\"progressbar\").style.width = \"100%\";\n document.getElementById(\"progressbox\").style.display = \"none\";\n });\n}\n"],"names":["___HTML_LOADER_IMPORT_0___","___HTML_LOADER_IMPORT_1___","module","exports","url","options","String","__esModule","default","hash","maybeNeedQuotes","test","concat","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","d","a","definition","key","o","Object","defineProperty","enumerable","get","g","globalThis","this","Function","e","window","obj","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","length","i","Error","replace","p","b","baseURI","self","href","async","run1","console","log","Word","run","start","performance","now","getElementById","style","display","width","paragraphs","context","body","load","sync","end","wordsRangeCollections","items","paragraph","text","wordsRangeCollection","getRange","split","push","error","wordChars","j","wordChar","font","bold","run2","percentage","Office","onReady","info","host","HostType","onclick","URL"],"sourceRoot":""} \ No newline at end of file