From 8bb83d740cb78493bad397e2481ea1450d29853f Mon Sep 17 00:00:00 2001 From: tinohager Date: Fri, 8 Mar 2024 08:25:39 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tinohage?= =?UTF-8?q?r/word-addin@6bf3cbc85b6c1113e6ce762dcb60fc964e20cf67=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taskpane.html | 2 +- taskpane.js | 2 +- taskpane.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/taskpane.html b/taskpane.html index fc566a7..3e8a77c 100644 --- a/taskpane.html +++ b/taskpane.html @@ -1 +1 @@ -Contoso Task Pane Add-in
Contoso

AddInn

Please sideload your add-in to see app body.

Demo Run V1 Run V2

\ No newline at end of file +Contoso Task Pane Add-in
Contoso

AddInn

Please sideload your add-in to see app body.

Run V1 Run V2

\ No newline at end of file diff --git a/taskpane.js b/taskpane.js index 1653186..ae006a1 100644 --- a/taskpane.js +++ b/taskpane.js @@ -1,2 +1,2 @@ -!function(){"use strict";var e,t,n,o,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,n){e.exports=n.p+"assets/logo-filled.png"},58394:function(e,t,n){e.exports=n.p+"1fda685b81e1123773f6.css"}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return r[e](n,n.exports,c),n.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 n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].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(){const e="1.3";async function t(){await Word.run((async e=>{const t=e.document,n=t.getSelection();n.insertText(" (M365)",Word.InsertLocation.end),n.load("text"),await e.sync(),t.body.insertParagraph("Original range: "+n.text,Word.InsertLocation.end),await e.sync()}))}async function n(){return console.log(`Run V1 - (V${e})`),await Word.run((async e=>{let t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const n=e.document.body.paragraphs;n.load("$all"),await n.context.sync(),document.getElementById("progressbar").style.width="10%";let o=performance.now();console.log(`Execution time load paragraphs: ${o-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%",o=performance.now(),console.log(`Execution time update word formatting: ${o-t} ms`),t=performance.now(),await e.sync(),o=performance.now(),console.log(`Execution time context sync: ${o-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}async function o(){return console.log(`Run V2 - (V${e})`),await Word.run((async e=>{const t=performance.now();document.getElementById("progressbox").style.display="block",document.getElementById("progressbar").style.width="0%";const n=e.document.body.paragraphs;n.load("$all"),await n.context.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 o=performance.now();console.log(`Execution time: ${o-t} ms`),document.getElementById("progressbar").style.width="100%",document.getElementById("progressbox").style.display="none"}))}Office.onReady((r=>{r.host===Office.HostType.Word&&(console.log(`AddIn - V${e}`),document.getElementById("sideload-msg").style.display="none",document.getElementById("app-body").style.display="flex",document.getElementById("runDemo").onclick=t,document.getElementById("run1").onclick=n,document.getElementById("run2").onclick=o)}))}(),e=c(14385),t=c.n(e),n=new URL(c(58394),c.b),o=new URL(c(98362),c.b),t()(n),t()(o)}(); +!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.1"),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.1"),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)}(); //# sourceMappingURL=taskpane.js.map \ No newline at end of file diff --git a/taskpane.js.map b/taskpane.js.map index 304b571..18a752f 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,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MAAM,GAAGU,KAAKC,MAAO,EAGpC,CACF,CACF,OAGMlC,EAAQO,OAEd,MAAMF,EAAMU,YAAYC,MACxBJ,QAAQC,IAAK,mBAAkBR,EAAMS,QAErClC,SAASqC,eAAe,eAAeC,MAAME,MAAQ,OACrDxC,SAASqC,eAAe,eAAeC,MAAMC,QAAU,MAAM,GAEjE,CAlNAkB,OAAOC,SAASC,IACVA,EAAKC,OAASH,OAAOI,SAAS5C,OAChCe,QAAQC,IAAK,YAAWnB,KACxBd,SAASqC,eAAe,gBAAgBC,MAAMC,QAAU,OACxDvC,SAASqC,eAAe,YAAYC,MAAMC,QAAU,OACpDvC,SAASqC,eAAe,WAAWyB,QAAU9C,EAC7ChB,SAASqC,eAAe,QAAQyB,QAAU/B,EAC1C/B,SAASqC,eAAe,QAAQyB,QAAUP,EAC5C,G,wBTfEpG,EAA6B,IAAI4G,IAAI,cACrC3G,EAA6B,IAAI2G,IAAI,cAEH,IAAyC5G,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.

Demo 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\nconst addinVersion = \"1.3\";\n\nOffice.onReady((info) => {\n if (info.host === Office.HostType.Word) {\n console.log(`AddIn - V${addinVersion}`);\n document.getElementById(\"sideload-msg\").style.display = \"none\";\n document.getElementById(\"app-body\").style.display = \"flex\";\n document.getElementById(\"runDemo\").onclick = insertTextIntoRange;\n document.getElementById(\"run1\").onclick = run1;\n document.getElementById(\"run2\").onclick = run2;\n }\n});\n\nexport async function insertTextIntoRange() {\n await Word.run(async (context) => {\n const doc = context.document;\n const originalRange = doc.getSelection();\n originalRange.insertText(\" (M365)\", Word.InsertLocation.end);\n\n originalRange.load(\"text\");\n await context.sync();\n\n doc.body.insertParagraph(\"Original range: \" + originalRange.text, Word.InsertLocation.end);\n\n await context.sync();\n });\n}\n\nexport async function run1() {\n console.log(`Run V1 - (V${addinVersion})`);\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 paragraphs.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 paragraph.load(\"text\");\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 - (V${addinVersion})`);\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 await paragraphs.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","addinVersion","async","insertTextIntoRange","Word","run","doc","context","originalRange","getSelection","insertText","InsertLocation","end","load","sync","body","insertParagraph","text","run1","console","log","start","performance","now","getElementById","style","display","width","paragraphs","wordsRangeCollections","items","paragraph","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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ASuB,eAAe,eAAeC,MAAME,MAAQ,OACrD1B,SAASuB,eAAe,eAAeC,MAAMC,QAAU,MAAM,GAEjE,CA9LAyB,OAAOC,SAASC,IACVA,EAAKC,OAASH,OAAOI,SAASpC,OAChClB,SAASuB,eAAe,gBAAgBC,MAAMC,QAAU,OACxDzB,SAASuB,eAAe,YAAYC,MAAMC,QAAU,OACpDzB,SAASuB,eAAe,QAAQgC,QAAUxC,EAC1Cf,SAASuB,eAAe,QAAQgC,QAAUP,EAC5C,G,wBTXE7F,EAA6B,IAAIqG,IAAI,cACrCpG,EAA6B,IAAIoG,IAAI,cAEH,IAAyCrG,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.1\");\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 && !wordChar.isNullObject) {\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.1\");\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 && !wordChar.isNullObject) {\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","isNullObject","font","bold","run2","percentage","Office","onReady","info","host","HostType","onclick","URL"],"sourceRoot":""} \ No newline at end of file