${game.i18n.localize("MESS.reloadReminder.text")}
`,buttons:{yes:{icon:'',label:game.i18n.localize("MESS.reloadReminder.yes"),callback:()=>location.reload()},no:{icon:'',label:game.i18n.localize("MESS.reloadReminder.no")}}}).render(!0)}}}}); +/*! exports provided: MessSettings */function(t,e,s){"use strict";s.r(e),s.d(e,"MessSettings",(function(){return a}));class a extends FormApplication{static init(){const t="dnd5e"===game.system.id;game.settings.register("mess","actor-item-sort",{name:"Activate item sort button.",hint:"Adds a button to actor sheets for sorting all items of that category alphabetically.",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","better-draggable",{name:"Activate better drag'n'drop workflow.",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","better-draggable-lists",{name:"Activate better drag'n'drop workflow for lists.",scope:"world",config:!1,default:!0,type:Boolean}),game.settings.set("mess","better-draggable-lists",!1),game.settings.register("mess","prepared-spell-tracker",{name:"Activate prepared spell tracker",hint:"Adds a tracker to the spellbook tab, providing a way to track the allowed maximum of prepared spells.",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","add-scrolling",{name:"Activating numerical field scrolling.",hint:"Lets you in-/decrease numerical fields in the Actor sheet using the mouse wheel when focused.",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","modify-rolling",{name:"Alternative Rolling.",hint:"Changes the way rolling is displayed and executed for DnD5e. Reload for all connected clients is required for this to take effect if changed!",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","attack-card-always-public",{name:"Roll mode for alternative rolling.",hint:"Always roll attack rolls public, with hidden rolls, but visible target.",scope:"world",config:!1,default:t,type:Boolean}),game.settings.register("mess","modify-templates",{name:"Activate modified templates.",hint:"Makes templates texture fill scaling instead of tiling and does allow the usage of videos as texture. Reload for all connected clients is required for this to take effect if changed!",scope:"world",config:!1,default:!0,type:Boolean}),game.settings.register("mess","change-placeables",{name:"Activate placeables changes.",hint:"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!",scope:"world",config:!1,default:!0,type:Boolean}),game.settings.registerMenu("mess","templateTexture",{name:game.i18n.localize("MESS.FVTTSettings.description"),label:game.i18n.localize("MESS.FVTTSettings.button"),icon:"fas fa-mug-hot",type:a,restricted:!0}),game.settings.register("mess","templateTexture",{name:"Activate placeables changes.",hint:"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!",scope:"world",default:!0,type:Object}),game.settings.register("mess","max-critical",{name:"Activate maximum critical rolls.",hint:"Changes behaviour of critical damage rolls to maximize the damage of the extra dice for criticals!",scope:"world",config:!1,default:!1,type:Boolean}),game.settings.register("mess","templateTexture",{name:"Activate placeables changes.",hint:"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!",scope:"world",config:!1,default:!0,type:Object}),game.settings.register("mess","templateAutoTargeting",{scope:"world",default:!0,type:Boolean}),game.settings.register("mess","templateDrawBordersOnlyOnHighlight",{scope:"world",default:!0,type:Boolean}),this.loadTemplates()}static loadTemplates(){loadTemplates(["modules/mess/templates/settings/templates.html","modules/mess/templates/settings/dnd5e.html","modules/mess/templates/settings/misc.html"])}static get defaultOptions(){return{...super.defaultOptions,template:"modules/mess/templates/settings/settings.html",height:"auto",title:"Mess - Moerills enhancing super-suit(e) - Settings Menu",width:600,classes:["mess","settings"],tabs:[{navSelector:".tabs",contentSelector:"form",initial:"name"}],submitOnClose:!0}}constructor(t={},e){super(t,e),this.object=game.settings.get("mess","templateTexture")}_getHeaderButtons(){let t=super._getHeaderButtons();return t[0].label="Save & Close",t}getSettingsData(){const t="dnd5e"===game.system.id;let e={"modify-templates":game.settings.get("mess","modify-templates"),"change-placeables":game.settings.get("mess","change-placeables"),templateTexture:game.settings.get("mess","templateTexture"),templateAutoTargeting:game.settings.get("mess","templateAutoTargeting"),templateDrawBordersOnlyOnHighlight:game.settings.get("mess","templateDrawBordersOnlyOnHighlight"),"better-draggable-lists":game.settings.get("mess","better-draggable-lists")};return t&&(e.templateTexture=game.settings.get("mess","templateTexture"),e["modify-rolling"]=game.settings.get("mess","modify-rolling"),e["max-critical"]=game.settings.get("mess","max-critical"),e["actor-item-sort"]=game.settings.get("mess","actor-item-sort"),e["prepared-spell-tracker"]=game.settings.get("mess","prepared-spell-tracker"),e["add-scrolling"]=game.settings.get("mess","add-scrolling"),e["attack-card-always-public"]=game.settings.get("mess","attack-card-always-public")),e}getData(){const t="dnd5e"===game.system.id;let e=super.getData();return t&&(e.dmgTypes=CONFIG.DND5E.damageTypes,e.templateTypes=CONFIG.MeasuredTemplate.types),e.isDnD=t,e.settings=this.getSettingsData(),e}activateListeners(t){super.activateListeners(t)}_updateObject(t,e){const s=expandObject(e);for(let[t,e]of Object.entries(s))game.settings.set("mess",t,e);new Dialog({content:`${game.i18n.localize("MESS.reloadReminder.text")}
`,buttons:{yes:{icon:'',label:game.i18n.localize("MESS.reloadReminder.yes"),callback:()=>location.reload()},no:{icon:'',label:game.i18n.localize("MESS.reloadReminder.no")}}}).render(!0)}}}}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/scripts/index.js.map b/dist/scripts/index.js.map index 51aabe9..774db95 100644 --- a/dist/scripts/index.js.map +++ b/dist/scripts/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/scripts/actor-item-sort-btn.js","webpack:///./src/scripts/add-scrolling.js","webpack:///./src/scripts/change-placeables.js","webpack:///./src/scripts/chat-popup/index.js","webpack:///./src/scripts/draggable-lists/draggable-list.js","webpack:///./src/scripts/draggable-lists/index.js","webpack:///./src/scripts/index.js","webpack:///./src/scripts/modify-templates.js","webpack:///./src/scripts/prepared-spell-tracker.js","webpack:///./src/scripts/rolls/apply-dmg.js","webpack:///./src/scripts/rolls/controls.js","webpack:///./src/scripts/rolls/dice.js","webpack:///./src/scripts/rolls/index.js","webpack:///./src/scripts/rolls/modify-rolling.js","webpack:///./src/scripts/rolls/util.js","webpack:///./src/scripts/settings.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","async","addAlphabeticalSorter","app","html","actor","_id","querySelectorAll","forEach","el","closest","dataset","tab","btn","innerHTML","classList","add","title","style","flex","margin","addEventListener","ev","lists","actorId","fromUuid","concatList","map","items","spells","flat","sort","a","b","siblings","sortUpdates","SortingHelpers","performIntegerSort","duplicate","sortBefore","updateData","u","update","updateEmbeddedEntity","sortItemListAlphabetically","prepend","itemSortBtn","Hooks","on","addScolling","preventDefault","stopPropagation","deltaY","currentTarget","Number","Math","max","$","change","onDragLeftMove","clones","destination","origin","originalEvent","canvas","_onDragCanvasPan","dx","x","dy","y","snap","previous","momentumThreshold","lambda","prev","prevMomentum","momentum","prevV","v","shiftKey","dest","_original","grid","getSnappedPosition","this","layer","options","gridPrecision","refresh","changePlaceables","PlaceableObject","_onDragLeftMove","initChatPopUp","getElementById","contains","log","DraggableList","container","selector","mergeObject","defaultOptions","_init","offset","time","dir","onDragStart","onDragEnd","onDrop","_items","Array","from","rect","getBoundingClientRect","insideChild","clientY","height","clientX","width","_resetOffsets","idx","_initItem","position","_onDragEnterItem","_onDragLeaveItem","matches","headerRect","top","bottom","TweenLite","to","paddingTop","_over","item","timeEnd","initDraggableLists","oldFun","SidebarDirectory","activateListeners","list","querySelector","SceneDirectory","_onLazyLoadImage","entries","observer","isIntersecting","li","backgroundImage","children","img","unobserve","game","settings","CONFIG","debug","mess","sheet","render","user","isGM","moduleVersion","version","register","default","String","scope","oldVersion","isNewerVersion","init","changeTemplates","newFun","MeasuredTemplate","toString","replace","Function","getTargets","isTokenInside","ret","dndTemplateSettings","system","id","importedJS","import","AbilityTemplate","itemHook","_originalFromItem","fromItem","template","path","getFlag","hasDamage","damage","parts","loadTexture","then","tex","texture","activatePreviewListeners","token","scene","templatePos","startX","startY","currGrid","shape","tokens","getEmbeddedCollection","targets","updateTokenTargets","div","innerText","i18n","localize","formField","inp","dtype","insertAdjacentHTML","button","_activateFilePicker","after","addPreparedSpellTracker","isNPC","tracker","border","preparedSpells","sep","val","isNaN","setFlag","constructor","alignSelf","parentNode","insertBefore","getAllDmg","reduce","getAllVersatile","resultArray","splice","modifyApplyDmg","canApply","canApplyNonVersatile","canApplyVersatile","hasTarget","targetId","hasNoTarget","contextOptionsDmg","condition","icon","callback","applyDamage","content","floor","contextOptionsRoll","ContextMenu","MessContextMenu","find","setProperty","controlled","args","super","_menuItems","menuItems","filteredItems","filter","ol","frag","createDocumentFragment","join","close","_setPosition","_animateOpen","removeClass","sign","amount","card","sceneId","scenes","ui","notifications","Token","getEmbeddedEntity","owner","chatLogHook","advSelector","userId","autoRollSelector","templateData","advantage","normal","disadvantage","autoShow","renderTemplate","active","toggle","set","arr","currIdx","findIndex","remove","newSelected","controls","childNodes","hit","dmg","Boolean","getD20Modifier","getAdvantageSettings","rollD20","adv","nd","mods","halflingLucky","elvenAccuracy","diceFormula","reliableTalent","unshift","d20Mod","Roll","roll","d20","total","tooltip","getTooltip","crit","fumble","showRolls","chatData","CONST","CHAT_MESSAGE_TYPES","OTHER","speaker","alias","rollMode","includes","ChatMessage","getWhisperRecipients","diceSoNice","whispers","blind","dice3d","showForRoll","getToHitData","hasAttack","actorData","itemData","flags","dnd5e","rollData","getRollData","proficient","weaponCriticalThreshold","critical","parseInt","abilityMod","actorBonus","bonuses","actionType","attackBonus","attack","filterJoin","totalModifier","_safeEval","cleanFormula","terms","situationalModifier","mod","formula","rollToHit","disabled","messageId","messages","isAuthor","Item","entityClass","_getChatCardActor","getOwnedItem","itemId","span","customTooltip","split","dataTerms","term","alter","updateMessage","replaceChild","getDmgData","spellLevel","level","versatile","itm","bnsDmgParts","itmData","lbl","DND5E","damageTypes","scaling","newDmgPart","lvl","details","_scaleCantripDamage","_scaleSpellDamage","part","hasInner","evaluate","_dice","concat","dice","pop","rollDmg","contextMenu","nextElementSibling","num","AudioHelper","play","sounds","rolling","toggleItemBonusDamage","itemName","getSpeaker","actors","warn","newState","preCreateChatMessageHook","renderAttack","getFlavor","chatFlavor","rollTables","matchAll","collection","tables","tableData","table","match","entities","result","results","text","areaSkill","keys","areaTargetTypes","getProperty","size","attackData","toHit","dmgs","autoroll","allowed","_handleResourceConsumption","isCard","isAttack","targetActor","targetData","ac","label","attributes","di","traits","toUpperCase","substring","custom","dr","dv","displayName","TOKEN_DISPLAY_MODES","ALWAYS","HOVER","attackTemplateData","flavor","autoRoll","whisper","dsn","rolls","toHitBtn","btns","actorSheetHook","abilityMods","off","abilityId","ability","abilities","feats","remarkableAthlete","characterFlags","ceil","prof","jackOfAllTrades","checkBonus","format","saveMods","rollAbilitySave","skills","skillId","skill","skl","bonus","chatListeners","onChatCardAction","_onChatCardToggleContent","onMouseEnterTarget","onMouseLeaveTarget","onDblClickTarget","onToggleShowPlayers","action","placeTemplate","_onChatCardAction","getTargetToken","_onHoverIn","visible","_onHoverOut","pos","center","animatePan","tokenId","placeables","checked","once","Actor","abl","saveBonus","MessSettings","FormApplication","isDnD","hint","config","registerMenu","restricted","loadTemplates","classes","tabs","navSelector","contentSelector","initial","submitOnClose","_getHeaderButtons","getData","dmgTypes","templateTypes","types","getSettingsData","formData","expandObject","Dialog","buttons","yes","location","reload","no"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GA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,UAOjB,OANIb,IACHhmB,EAAK8mB,SAAW9X,OAAOgP,MAAMC,YAC7Bje,EAAK+mB,cAAgB/X,OAAOkB,iBAAiB8W,OAE9ChnB,EAAKgmB,MAAQA,EACbhmB,EAAK+O,SAAWnE,KAAKqc,kBACdjnB,EAGR,kBAAkB4F,GACjB8P,MAAMzH,kBAAkBrI,GAGzB,cAAckB,EAAIogB,GACjB,MAAMlnB,EAAOmnB,aAAaD,GAC1B,IAAK,IAAKtiB,EAAKN,KAAU9D,OAAO8N,QAAQtO,GACvC8O,KAAKC,SAAS8I,IAAI,OAAQjT,EAAKN,GAEhC,IAAI8iB,OAAO,CACVnS,QAAS,MAAMnG,KAAK4D,KAAKC,SAAS,kCAClC0U,QAAS,CACRC,IAAK,CACJxS,KAAM,+BACN8M,MAAO9S,KAAK4D,KAAKC,SAAS,2BAC1BoC,SAAU,IAAMwS,SAASC,UAE1BC,GAAI,CACH3S,KAAM,+BACN8M,MAAO9S,KAAK4D,KAAKC,SAAS,8BAG1BvD,QAAO","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"bundles/\" + ({\"welcome-screen\":\"welcome-screen\"}[chunkId]||chunkId) + \".\" + {\"welcome-screen\":\"a969\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"modules/mess/scripts/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/scripts/index.js\");\n","async function sortItemListAlphabetically(lists, actorId) {\n\tconst actor = await fromUuid(`Actor.${actorId}`);\n\tlet concatList = lists.map(e => e.items || e.spells).flat();\n\tconcatList.sort(function (a, b) {\n\t\tif (a.name < b.name) return -1;\n\t\tif (a.name > b.name) return 1;\n\t\treturn 0;\n\t});\n\tlet siblings = [concatList.shift()];\n\tlet sortUpdates = [];\n\tfor (; concatList.length > 0; siblings.push(concatList.shift())) {\n\t\tsortUpdates = (SortingHelpers.performIntegerSort(concatList[0], {\n\t\t\ttarget: siblings[siblings.length-1], \n\t\t\tsiblings: duplicate(siblings),\n\t\t\tsortBefore: false}));\t\t\n\t}\n\tconst updateData = sortUpdates.map(u => {\n\t\tlet update = u.update;\n\t\tupdate._id = u.target._id;\n\t\treturn update;\n\t})\n\tactor.updateEmbeddedEntity('OwnedItem', updateData);\n}\n\nasync function addAlphabeticalSorter(app, html, data) {\n\tif (!data.actor._id) return;\n\tconst header = html.querySelectorAll('.filter-list');\n\n\theader.forEach(el => {\n\t\tconst type = el.closest('.tab').dataset.tab;\n\t\tconst btn = document.createElement('a');\n\t\tbtn.innerHTML = '';\n\t\tbtn.classList.add('mess-sort-btn');\n\t\tbtn.title = `Sort ${type} alphabetically.`;\n\t\tbtn.style.flex = 0;\n\t\tbtn.style.margin = \"0 5px 0 0\";\n\t\tbtn.addEventListener('click',\t(ev) => sortItemListAlphabetically(data[type], data.actor._id))\n\t\tel.prepend(btn);\n\t});\n}\n\nexport default async function itemSortBtn() {\n\tHooks.on('renderActorSheet', (app, html, data) => {\n\t\taddAlphabeticalSorter(app, html[0], data);\n\t});\n}","export default async function addScolling() {\n\tHooks.on('renderActorSheet', async function (app, html, data) {\n\t\thtml[0].querySelectorAll('input[data-dtype=\"Number\"], .item-uses input').forEach(el => {\n\t\t\tel.addEventListener('wheel', ev => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tev.stopPropagation();\n\t\t\t\tif (ev.deltaY < 0)\n\t\t\t\t\tev.currentTarget.value = Number(ev.currentTarget.value) + 1;\n\t\t\t\tif (ev.deltaY > 0)\n\t\t\t\t\tev.currentTarget.value = Math.max(Number(ev.currentTarget.value) - 1, 0);\n\n\t\t\t\t$(ev.currentTarget).change()\n\t\t\t});\n\t\t})\n\t});\n}","function onDragLeftMove(event) {\n\tconst {clones, destination, origin, originalEvent} = event.data;\n\n\t// Pan the canvas if the drag event approaches the edge\n\tcanvas._onDragCanvasPan(originalEvent);\n\n\t// Determine dragged distance\n\tconst dx = destination.x - origin.x;\n\tconst dy = destination.y - origin.y;\n\n\tlet snap = false;\n\tif (event.data.previous) {\n\t\t// Interesting would be here how this all behaves for different monitor sizes/performances and when Atro possibly introduces more adaptive rates for mosue movement. \n\t\t// Why? Because currently i just set the timedifferences between function calls to 1. So for 60Hz it behaves same as 30Hz although for 30Hz the distance travelled could be bigger.\n\t\t// All this because i don't want divisions in here for the moment....\n\t\tconst momentumThreshold = 30;\n\t\t// smaller lambda means less \"memory\" => current momentum does have more impact\n\t\t// => more jumping around between snapping and not\n\t\t// but higher means more waiting/slow movement time for it to snap\n\t\tconst lambda = 0.8;\n\t\tconst prev = event.data.previous;\n\t\tconst prevMomentum = event.data.momentum || 0;\n\t\tconst prevV = event.data.v || {x: 0, y: 0};\n\t\tconst v = {\n\t\t\tx: destination.x - prev.x,\n\t\t\ty: destination.y - prev.y\n\t\t}\n\t\tconst momentum = {\n\t\t\tx: v.x - prevV.x,\n\t\t\ty: v.y - prevV.y\n\t\t};\n\n\t\tevent.data.momentum = (momentum.x * momentum.x + momentum.y * momentum.y) + prevMomentum * lambda;\n\t\tsnap = !event.shiftKey && event.data.momentum < momentumThreshold;\n\t}\n\n\tevent.data.previous = destination;\n\n\t// Update the position of each clone\n\tfor ( let c of clones || [] ) {\n\t\tlet dest = {x: c._original.data.x + dx, y: c._original.data.y + dy};\n\t\tif ( snap ) {\n\t\t\tdest = canvas.grid.getSnappedPosition(dest.x, dest.y, this.layer.options.gridPrecision);\n\t\t}\n\t\tc.data.x = dest.x;\n\t\tc.data.y = dest.y;\n\t\tc.refresh();\n\t}\n}\n\nexport function changePlaceables() {\n\tPlaceableObject.prototype._onDragLeftMove = onDragLeftMove;\n\t// Change got bigger than expected, so.. complete swap it is\n}","export function initChatPopUp() {\n\tHooks.on('renderChatMessage', (app, html, options) => {\n\t\tif (document.getElementById('chat').classList.contains('active')) return;\n\n\n\t\tconsole.log('rendering chat message');\n\t\tconsole.log(app, html, options);\n\t\tconsole.log(document.getElementById('chat').classList.contains('active'))\n\t});\n\n\tconst hud = document.getElementById('hud');\n\n\tlet popupDiv = hud.appendChild(document.createElement('div'));\n\tpopupDiv.classList.add('mess-chat-popup')\n}","//import { TweenLite } from '/scripts/greensock/esm/all.js';\n\nexport class DraggableList {\n\tconstructor(container, selector, options = {}) {\n\t\tthis.container = container;\n\t\tthis.selector = selector;\n\t\tthis.options = mergeObject(this.defaultOptions, options);\n\n\t\tthis._init();\n\t}\n\n\tget defaultOptions() {\n\t\treturn {\n\t\t\toffset: 21, // in px\n\t\t\ttime: 0.2, // in seconds\n\t\t\tdir: null, // this selector will not get offset when hovered over\n\t\t\t// folowing are not used\n\t\t\tonDragStart: null,\n\t\t\tonDragEnd: null,\n\t\t\tonDrop: null,\n\t\t};\n\t}\n\n\tasync _init() {\n\t\t// this._items = Array.from(this.container.childNodes).filter(e => e.matches && e.matches(this.selector));\n\t\tthis._items = Array.from(this.container.querySelectorAll(this.selector));\n\t\tthis.container.addEventListener('dragleave', (ev) => {\n\t\t\tconst rect = this.container.getBoundingClientRect();\n\t\t\tconst boundary = 5;\n\t\t\t// Reset offsets, when first target was inside a child container.\n\t\t\tconst insideChild = ev.insideChild;\n\t\t\tif (\n\t\t\t\t!insideChild &&\n\t\t\t\tev.clientY < rect.y + rect.height - boundary &&\n\t\t\t\tev.clientY > rect.y + boundary &&\n\t\t\t\tev.clientX > rect.x + boundary &&\n\t\t\t\tev.clientX < rect.x - boundary + rect.width\n\t\t\t) {\n\t\t\t\tev.insideChild = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._resetOffsets();\n\t\t});\n\n\t\t/** Possibly modifying the drop target.\n\t\t * Why?\n\t\t * Due to the method used, the target gets moved out of the way and it will automatically drop onto the container element.\n\t\t * Most drop functions in fvtt just append to the end though, when dropping onto the container.\n\t\t * => We search for the first offset element and define that one as target. Since default for sorting is \"insertBefore\", and most implementations i've found build upon FVTT default/dnd5e systems default, this is a rather save implementation to find the real target.\n\t\t */\n\t\tthis.container.addEventListener('drop', (ev) => {\n\t\t\t// const insideChild = ev.insideChild;\n\t\t\t// if (this._over) {\n\t\t\t// \tObject.defineProperty(ev, 'target', {writable: false, value: this._over})\n\t\t\t// \t// Make sure that outer directories are not overwriting this stuff!\n\t\t\t// \t// ev.insideChild = true;\n\t\t\t// }\n\t\t});\n\t\tthis._items.forEach((e, idx) => this._initItem(e, idx));\n\t}\n\n\tasync _initItem(el, idx) {\n\t\tel.style.position = 'relative';\n\t\tel.addEventListener('dragenter', (ev) => this._onDragEnterItem(ev, idx));\n\t\tel.addEventListener('dragleave', (ev) => this._onDragLeaveItem(ev, idx));\n\t\tel.addEventListener('dragend', (ev) => {\n\t\t\t// safety net if for some reasons the rerender is to slow or fails...\n\t\t\t// const srcElement = ev.currentTarget;\n\t\t\t// srcElement.style.opacity = null;\n\t\t\t// srcElement.style.height = null;\n\t\t\t// TweenLite.from(srcElement, this.options.time, {opacity:0, height:0});\n\t\t\tthis._resetOffsets();\n\t\t});\n\t\t// el.addEventListener('dragstart', ev => {\n\t\t// \tthis._dragged = ev.currentTarget;\n\t\t// \t// if (ev.currentTarget.matches(this.dir))\n\t\t// \t// \tthis._draggingDir = true;\n\t\t// \t// else\n\t\t// \t// \tthis._draggingDir = false;\n\t\t// \t// TweenLite.to(ev.currentTarget, this.options.time, {opacity: 0, height: 0});\n\t\t// })\n\t}\n\n\t_onDragEnterItem(ev, idx) {\n\t\tconsole.time('dragEnter');\n\t\tev.stopPropagation();\n\n\t\t// // save the current target\n\t\tconst time = this.options.time;\n\t\tconst offset = this.options.offset;\n\t\tthis._resetOffsets();\n\t\tlet target = ev.currentTarget;\n\t\tconsole.log(ev.currentTarget);\n\t\t// if inside a container, just make sure that its not jumping around. (Sometimes its ignoring the real target...)\n\t\tif (target.matches(this.options.dir)) {\n\t\t\tconst items = Array.from(target.querySelectorAll(this.selector));\n\t\t\tconst headerRect = target.getBoundingClientRect();\n\t\t\tif (ev.clientY > headerRect.top && ev.clientY < headerRect.bottom) {\n\t\t\t\tTweenLite.to(items, time, { paddingTop: 0 });\n\t\t\t\tthis._over = target;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (let item of items) {\n\t\t\t\tconst rect = item.getBoundingClientRect();\n\t\t\t\tif (rect.bottom > ev.clientY) {\n\t\t\t\t\ttarget = item;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._over = target;\n\t\tconsole.log(target, offset);\n\t\tTweenLite.to(target, time, { paddingTop: offset });\n\t\t// let resetList = [];\n\t\t// let offsetList = [];\n\t\t// let prev = item.previousElementSibling;\n\t\t// while (prev) {\n\t\t// \t// TweenLite.to(prev, time, {top: 0})\n\t\t// \tresetList.push(prev);\n\t\t// \tprev = prev.previousElementSibling;\n\t\t// }\n\t\t// let next = item;\n\t\t// while (next) {\n\t\t// \tif (!this._draggingDir && next.matches(this.options.dir)) {\n\t\t// \t\t// TweenLite.to(next, time, {top: 0});\n\t\t// \t\tresetList.push(next);\n\t\t// \t} else\n\t\t// \t\toffsetList.push(next);\n\t\t// \t\t// TweenLite.to(next, time, {top: offset});\n\t\t// \tnext = next.nextElementSibling;\n\t\t// }\n\n\t\t// // // if (ev.currentTarget.matches(this.options.dir)) {\n\n\t\t// // // \tidx = idx + 1;\n\t\t// // // }\n\t\t// // // for (let i = idx; i < this._items.length; i++) {\n\t\t// // // \tconst rect = this._items[i].getBoundingClientRect();\n\t\t// // // }\n\t\t// // const resetList = this._items.slice(0, idx);\n\t\t// TweenLite.to(resetList, time, {top: 0});\n\t\t// // const offsetList = this._items.slice(idx);\n\t\t// TweenLite.to(offsetList, time, {top: offset});\n\n\t\tconsole.timeEnd('dragEnter');\n\t\treturn false;\n\t}\n\n\t_onDragLeaveItem(ev, idx) {\n\t\t// console.time('dragLeave')\n\t\tev.stopPropagation();\n\t\treturn false;\n\t\t// // Empty for now?\n\n\t\t// TweenLite.to(ev.currentTarget, 0.3, {transform: \"scale(1, 1)\"});\n\t\t// console.timeEnd('dragLeave')\n\t}\n\n\t// We now work with padding, cause.. reasons..\n\t_resetOffsets(time = this.options.time) {\n\t\t// TweenLite.to(this._items, time, {top: 0});\n\t\tTweenLite.to(this._items, time, { paddingTop: 0 });\n\t}\n}\n","import {DraggableList} from './draggable-list';\n\nexport function initDraggableLists() {\n // make sure my listeners to get bound _before_ the class owns get bound to the elements\n // Only needed for the \"root\" directory though.. :/\n const oldFun = SidebarDirectory.prototype.activateListeners;\n SidebarDirectory.prototype.activateListeners = function(html) {\n // const list = html[0].querySelectorAll('.directory-list, .directory-item');\n // list.forEach(e => new DraggableList(e, '.entity'));\n const list = html[0].querySelector('.directory-list');\n new DraggableList(list, '.entity, .folder', {dir: '.folder'});\n oldFun.call(this, html);\n }\n\n // this does work, since on default most sheets have their drop function bound to the form, not the item list!\n Hooks.on('renderActorSheet', (app, html, options) => {\n const list = html[0].querySelectorAll('.item-list');\n list.forEach(e => new DraggableList(e, '.item'));\n });\n\n SceneDirectory.prototype._onLazyLoadImage = function(entries, observer) {\n for ( let e of entries ) {\n if ( !e.isIntersecting ) continue;\n const li = e.target;\n\n // Background Image\n if ( li.dataset.backgroundImage ) {\n li.children[0].style[\"background-image\"] = `url(\"${li.dataset.backgroundImage}\")`;\n delete li.dataset.backgroundImage;\n }\n\n // Avatar image\n const img = li.querySelector(\"img\");\n if ( img && img.dataset.src ) {\n img.src = img.dataset.src;\n delete img.dataset.src;\n }\n\n // No longer observe the target\n observer.unobserve(e.target);\n }\n }\n}","import { rolling } from './rolls';\nimport { MessSettings } from './settings.js';\nimport { dndTemplateSettings, changeTemplates } from './modify-templates.js';\nimport { changePlaceables } from './change-placeables.js';\nimport itemSortBtn from './actor-item-sort-btn.js';\nimport preparedSpellTracker from './prepared-spell-tracker.js';\nimport addScrolling from './add-scrolling.js';\n\nimport { initDraggableLists } from './draggable-lists';\nimport { initChatPopUp } from './chat-popup';\n\nHooks.on('ready', async function () {\n\tif (game.settings.get('mess', 'actor-item-sort')) itemSortBtn();\n\tif (game.settings.get('mess', 'prepared-spell-tracker'))\n\t\tpreparedSpellTracker();\n\tif (game.settings.get('mess', 'add-scrolling')) addScrolling();\n\n\tif (CONFIG.debug.mess) {\n\t\tconst actor = await fromUuid('Actor.xV3LUAg05Pz5MFTS');\n\t\tactor.sheet.render(true);\n\t}\n\n\t// initChatPopUp();\n\n\tif (!game.user.isGM) return;\n\t// Edit next line to match module.\n\tconst module = game.modules.get('mess');\n\tconst title = module.data.title;\n\tconst moduleVersion = module.data.version;\n\tgame.settings.register(title, 'version', {\n\t\tname: `${title} Version`,\n\t\tdefault: '0.0.0',\n\t\ttype: String,\n\t\tscope: 'world',\n\t});\n\tconst oldVersion = game.settings.get(title, 'version');\n\n\tif (!isNewerVersion(moduleVersion, oldVersion)) return;\n\n\t(\n\t\tawait import(\n\t\t\t/* webpackChunkName: \"welcome-screen\" */\n\t\t\t'./welcome-screen.js'\n\t\t)\n\t).default();\n});\n\nHooks.on('init', function () {\n\tgame.mess = {};\n\tCONFIG.debug.mess = false;\n\tMessSettings.init();\n\n\trolling();\n\n\tdndTemplateSettings();\n\tchangeTemplates();\n\tif (game.settings.get('mess', 'change-placeables')) changePlaceables();\n\t//\tif (game.settings.get('mess', 'better-draggable-lists'))\n\t//\t\tinitDraggableLists();\n});\n","export function changeTemplates() {\n\t// #MonkeyPatchingFTW\n\t// better than stealing the code, replacing one line and then release it under a/the wrong license..\n\t// Disadvantage: could need more fixing on updates. At least i didn#t make it line based like Kakaroto.. :P\n\n\tlet newFun = MeasuredTemplate.prototype.refresh.toString();\n\n\tif (game.settings.get('mess', 'modify-templates')) {\n\t\tnewFun = newFun.replace(\n\t\t\t/this\\.template\\.beginTextureFill\\(\\{[\\s\\S]*\\}\\)\\;/,\n\t\t\t`\n\t\t\t{\n\t\t\t\tlet mat = PIXI.Matrix.IDENTITY;\n\t\t\t\t// rectangle\n\t\t\t\tif (this.shape.width && this.shape.height)\n\t\t\t\t\tmat.scale(this.shape.width / this.texture.width, this.shape.height / this.texture.height);\n\t\t\t\telse if (this.shape.radius) {\n\t\t\t\t\tmat.scale(this.shape.radius * 2 / this.texture.height, this.shape.radius * 2 / this.texture.width)\n\t\t\t\t\t// Circle center is texture start...\n\t\t\t\t\tmat.translate(-this.shape.radius, -this.shape.radius);\n\t\t\t\t} else if (this.data.t === \"ray\") {\n\t\t\t\t\tconst d = canvas.dimensions,\n\t\t\t\t\t\t\t\theight = this.data.width * d.size / d.distance,\n\t\t\t\t\t\t\t\twidth = this.data.distance * d.size / d.distance;\n\t\t\t\t\tmat.scale(width / this.texture.width, height / this.texture.height);\n\t\t\t\t\tmat.translate(0, -height * 0.5);\n\n\t\t\t\t\tmat.rotate(toRadians(this.data.direction));\n\t\t\t\t} else {// cone\n\t\t\t\t\tconst d = canvas.dimensions;\n\t\t\t\n\t\t\t\t\t// Extract and prepare data\n\t\t\t\t\tlet {direction, distance, angle} = this.data;\n\t\t\t\t\tdistance *= (d.size / d.distance);\n\t\t\t\t\tdirection = toRadians(direction);\n\t\t\t\t\tconst width = this.data.distance * d.size / d.distance;\n\n\t\t\t\t\tconst angles = [(angle/-2), (angle/2)];\n\t\t\t\t\tdistance = distance / Math.cos(toRadians(angle/2));\n\t\t\t\n\t\t\t\t\t// Get the cone shape as a polygon\n\t\t\t\t\tconst rays = angles.map(a => Ray.fromAngle(0, 0, direction + toRadians(a), distance+1));\n\t\t\t\t\tconst height = Math.sqrt((rays[0].B.x - rays[1].B.x) * (rays[0].B.x - rays[1].B.x)\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ (rays[0].B.y - rays[1].B.y) * (rays[0].B.y - rays[1].B.y));\n\t\t\t\t\tmat.scale(width / this.texture.width, height / this.texture.height);\n\t\t\t\t\tmat.translate(0, -height/2)\n\t\t\t\t\tmat.rotate(toRadians(this.data.direction));\n\t\t\t\t}\n\t\t\t\tthis.template.beginTextureFill({\n\t\t\t\t\ttexture: this.texture,\n\t\t\t\t\tmatrix: mat,\n\t\t\t\t\talpha: 0.8\n\t\t\t\t});\n\t\t\t\t// move into draw or so\n\t\t\t\tconst source = getProperty(this.texture, \"baseTexture.resource.source\")\n\t\t\t\tif ( source && (source.tagName === \"VIDEO\") ) {\n\t\t\t\t\tsource.loop = true;\n\t\t\t\t\tsource.muted = true;\n\t\t\t\t\tgame.video.play(source);\n\t\t\t\t}\n\t\t}`\n\t\t);\n\n\t\tHooks.on('renderMeasuredTemplateConfig', (app, html, data) => {\n\t\t\thtml[0].querySelector('.file-picker').dataset.type = 'imagevideo';\n\t\t});\n\t}\n\n\tif (game.settings.get('mess', 'templateDrawBordersOnlyOnHighlight')) {\n\t\tnewFun = newFun.replace(\n\t\t\t/this\\.\\_borderThickness/,\n\t\t\t'this.texture && !this._hover ? 0 : this._borderThickness'\n\t\t);\n\t\tnewFun = newFun.replace(\n\t\t\t/return\\sthis\\;/,\n\t\t\t`\n\t\t\tconst grid = canvas.grid;\n\t\t\t// only show grid highlights on hover\n\t\t\tif (this.texture) {\n\t\t\t\tconst hl = grid.getHighlightLayer(\\`Template.\\$\\{this.id\\}\\`);\n\t\t\t\tif (hl)\n\t\t\t\t\thl.renderable = this._hover;\n\t\t\t}\n\t\t\treturn this;`\n\t\t);\n\t}\n\n\tMeasuredTemplate.prototype.refresh = Function(\n\t\t`\"use strict\"; return ( function ${newFun} )`\n\t)();\n\n\tif (game.settings.get('mess', 'templateAutoTargeting')) {\n\t\tMeasuredTemplate.prototype.getTargets = getTargets;\n\t\tMeasuredTemplate.prototype.isTokenInside = isTokenInside;\n\n\t\tconst oldFun = MeasuredTemplate.prototype._onDragLeftMove;\n\t\tMeasuredTemplate.prototype._onDragLeftMove = function (ev) {\n\t\t\tconst ret = oldFun.bind(this)(ev);\n\n\t\t\tfor (let c of ev.data.clones) this.getTargets(c);\n\n\t\t\treturn ret;\n\t\t};\n\t}\n}\n\nexport async function dndTemplateSettings() {\n\tif (game.system.id !== 'dnd5e') return;\n\n\tconst importedJS = await import(\n\t\t/* webpackIgnore: true */ '/systems/dnd5e/module/pixi/ability-template.js'\n\t);\n\tconst AbilityTemplate = importedJS.default || importedJS.AbilityTemplate;\n\n\t// Auto texture creation from item\n\tif (game.settings.get('mess', 'modify-templates')) {\n\t\tHooks.on('renderItemSheet', itemHook);\n\n\t\tconst _originalFromItem = AbilityTemplate.fromItem;\n\t\tAbilityTemplate.fromItem = function (item) {\n\t\t\tconst template = _originalFromItem.bind(this)(item);\n\n\t\t\t// generate a texture based on the items dmg type, ...\n\t\t\t// Add settings to define custom templates for stuff.\n\t\t\tlet path = item.getFlag('mess', 'templateTexture');\n\t\t\tif (!path && item.hasDamage) {\n\t\t\t\tconst settings = game.settings.get('mess', 'templateTexture') || {};\n\t\t\t\tpath = settings[item.data.data.damage.parts[0][1]] || {};\n\t\t\t\tpath = path[template.data.t];\n\t\t\t}\n\t\t\tif (path)\n\t\t\t\tloadTexture(path).then((tex) => {\n\t\t\t\t\ttemplate.texture = tex;\n\t\t\t\t\ttemplate.data.texture = path;\n\t\t\t\t\ttemplate.refresh();\n\t\t\t\t});\n\t\t\ttemplate.item = item;\n\t\t\treturn template;\n\t\t};\n\t}\n\n\tif (game.settings.get('mess', 'templateAutoTargeting')) {\n\t\t// rather ugly, maybe find a better way at some point :shrug:\n\t\tconst origPrevListeners = AbilityTemplate.prototype.activatePreviewListeners.toString();\n\t\tconst newFun = origPrevListeners.replace(\n\t\t\t/this\\.refresh\\(\\)\\;/,\n\t\t\t// get targets\n\t\t\t`this.refresh();\n\t\t\t\t\t\tthis.getTargets(this);\n\t\t\t\t\t`\n\t\t);\n\n\t\tAbilityTemplate.prototype.getTargets = getTargets;\n\t\tAbilityTemplate.prototype.isTokenInside = isTokenInside;\n\n\t\tAbilityTemplate.prototype.activatePreviewListeners = Function(\n\t\t\t`\"use strict\"; return ( function ${newFun} )`\n\t\t)();\n\t}\n}\n\nfunction isTokenInside(token) {\n\tconst grid = canvas.scene.data.grid,\n\t\ttemplatePos = { x: this.data.x, y: this.data.y };\n\t// Check for center of each square the token uses.\n\t// e.g. for large tokens all 4 squares\n\tconst startX = token.width >= 1 ? 0.5 : token.width / 2;\n\tconst startY = token.height >= 1 ? 0.5 : token.height / 2;\n\tfor (let x = startX; x < token.width; x++) {\n\t\tfor (let y = startY; y < token.height; y++) {\n\t\t\tconst currGrid = {\n\t\t\t\tx: token.x + x * grid - templatePos.x,\n\t\t\t\ty: token.y + y * grid - templatePos.y,\n\t\t\t};\n\t\t\tconst contains = this.shape.contains(currGrid.x, currGrid.y);\n\t\t\tif (contains) return true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getTargets(template) {\n\tconst tokens = canvas.scene.getEmbeddedCollection('Token');\n\tlet targets = [];\n\n\tfor (const token of tokens)\n\t\tif (template.isTokenInside(token)) {\n\t\t\ttargets.push(token._id);\n\t\t}\n\tgame.user.updateTokenTargets(targets);\n}\n\nasync function itemHook(app, html) {\n\tconst div = document.createElement('div');\n\tdiv.classList.add('form-group');\n\tdiv.appendChild(\n\t\tdocument.createElement('label')\n\t).innerText = game.i18n.localize('MESS.itemSheet.templateTexture');\n\tconst formField = div.appendChild(document.createElement('div'));\n\tformField.classList.add('form-fields');\n\tconst inp = formField.appendChild(document.createElement('input'));\n\tinp.dataset.dtype = 'String';\n\tinp.type = 'text';\n\tinp.name = 'flags.mess.templateTexture';\n\tinp.value = app.object.getFlag('mess', 'templateTexture') || '';\n\n\tformField.insertAdjacentHTML(\n\t\t'beforeend',\n\t\t`\n\t\t\n\t`\n\t);\n\tconst button = formField.querySelector('button');\n\tbutton.style.flex = '0';\n\tapp._activateFilePicker(button);\n\tconst target = html[0].querySelector('[name=\"data.target.units\"]');\n\tif (target) target.closest('.form-group').after(div);\n}\n","export default async function addPreparedSpellTracker() {\n\tHooks.on('renderActorSheet', async function (app, html, data) {\n\t\tconst actor = await fromUuid(`Actor.${data.actor._id}`);\n\t\tif (actor.isNPC) return;\n\t\t\n\t\tconst spellDc = html[0].querySelector('.spell-dc');\n\t\tif (!spellDc) return;\n\t\tlet tracker = document.createElement('div');\n\t\ttracker.classList.add('spell-detail');\n\t\ttracker.classList.add('spell-slots');\n\t\ttracker.style.flex = '1';\n\t\ttracker.style.border = 'none';\n\t\tconst spanPrep = tracker.appendChild(document.createElement('span'));\n\t\tspanPrep.innerText = `${game.i18n.localize('MESS.actorSheet.preparedSpellTracker')}: ${data.preparedSpells}`;\n\n\t\tconst sep = tracker.appendChild(document.createElement('span'));\n\t\tsep.innerText = ' / ';\n\t\tsep.classList.add('sep');\n\n\t\tconst max = tracker.appendChild(document.createElement('input'));\n\t\tmax.type = 'text';\n\t\tmax.value = actor.getFlag('mess', 'maxPreparedSpells') || 0;\n\t\tmax.addEventListener('change', async function(ev) {\n\t\t\tev.preventDefault();\n\t\t\tev.stopPropagation();\n\t\t\tconst val = Number(ev.currentTarget.value);\n\t\t\tif (isNaN(val)) {\n\t\t\t\tev.currentTarget.value = actor.getFlag('mess', 'maxPreparedSpells') || 0;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tactor.setFlag('mess', 'maxPreparedSpells', val);\n\t\t\treturn false;\n\t\t});\n\t\t\n\t\tif (app.constructor.name === 'Tidy5eSheet') {\n\t\t\tconst el = html[0].querySelector('.spellcasting-ability');\n\t\t\tif (!el)\n\t\t\t\treturn;\n\t\t\tel.appendChild(tracker, el);\n\t\t} else {\n\t\t\tconst el = html[0].querySelector('.spellbook .inventory-list');\n\t\t\tif (!el)\treturn;\n\t\t\ttracker.style.flex = '0';\n\t\t\ttracker.style.alignSelf = 'flex-start';\n\t\t\ttracker.style.margin = '0 8px';\n\t\t\tel.parentNode.insertBefore(tracker, el);\n\t\t}\n\t});\n}","function getAllDmg(li) {\n\tconst results = Array.from(li[0].parentNode.querySelectorAll('.mess-dice-result:not(.mess-versatile')).map(e => Number(e.querySelector('span').innerText));\n\treturn results.reduce((a, b) => a + b, 0);\n}\n\nfunction getAllVersatile(li) {\n\tconst resultArray = Array.from(li[0].parentNode.querySelectorAll('.mess-dice-result'));\n\tif (resultArray.length > 1 && resultArray[1].classList.contains('mess-versatile'))\n\t\tresultArray.splice(0,1)\n\tconst results = resultArray.map(e => Number(e.querySelector('span').innerText));\n\treturn results.reduce((a, b) => a + b, 0);\n}\n\nexport default function modifyApplyDmg() {\n\tconst canApply = (li) => true || canvas.tokens.controlled.length;\n\tconst canApplyNonVersatile = (li) => canApply(li) && li[0].parentNode.querySelector('.mess-dice-result:not(.mess-versatile)');\n\tconst canApplyVersatile = (li) => canApply(li) && li[0].parentNode.querySelector('.mess-versatile');\n\tconst hasTarget = (li) => !!li[0].closest('.mess-attack-card').dataset.targetId;\n\tconst hasNoTarget = (li) => !hasTarget(li);\n\tconst contextOptionsDmg = [\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.applyTarget\"),\n\t\t\tcondition: hasTarget\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.applySelected\"),\n\t\t\tcondition: hasNoTarget\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.dmg\"),\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${getAllDmg(li)}`\n\t\t},\n\t\t{\n\t\t\tname: 'half',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.max(Math.floor(getAllDmg(li) * 0.5), 1)}`\n\t\t},\n\t\t{\n\t\t\tname: 'double',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.floor(getAllDmg(li) * 2)}`\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.healing\"),\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyNonVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, -1),\n\t\t\tcontent: (li) => `${getAllDmg(li)}`\n\t\t},\n\t\t{\n\t\t\tname: [game.i18n.localize('DND5E.Versatile'), ' - ', game.i18n.localize(\"MESS.attackCard.contextMenu.dmg\")],\n\t\t\tcondition: canApplyVersatile,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${getAllVersatile(li)}`\n\t\t},\n\t\t{\n\t\t\tname: 'half',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.max(Math.floor(getAllVersatile(li) * 0.5), 1)}`\n\t\t},\n\t\t{\n\t\t\tname: 'double',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.floor(getAllVersatile(li) * 2)}`\n\t\t},\n\t\t{\n\t\t\tname: [game.i18n.localize('DND5E.Versatile'), ' - ', game.i18n.localize(\"MESS.attackCard.contextMenu.healing\")],\n\t\t\tcondition: canApplyVersatile,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApplyVersatile,\n\t\t\tcallback: (target, li) => applyDamage(li, -1),\n\t\t\tcontent: (li) => `${getAllVersatile(li)}`\n\t\t}\n\t]\n\n\n\tconst contextOptionsRoll = [\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.applyTarget\"),\n\t\t\tcondition: hasTarget\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.applySelected\"),\n\t\t\tcondition: hasNoTarget\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.dmg\"),\n\t\t\tcondition: canApply,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApply,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${li[0].querySelector('span').innerText}`\n\t\t},\n\t\t{\n\t\t\tname: 'half',\n\t\t\ticon: '',\n\t\t\tcondition: canApply,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.max(Math.floor(Number(li[0].querySelector('span').innerText) * 0.5), 1)}`\n\t\t},\n\t\t{\n\t\t\tname: 'double',\n\t\t\ticon: '',\n\t\t\tcondition: canApply,\n\t\t\tcallback: (target, li) => applyDamage(li, 1),\n\t\t\tcontent: (li) => `${Math.floor(Number(li[0].querySelector('span').innerText) * 2)}`\n\t\t},\n\t\t{\n\t\t\tname: game.i18n.localize(\"MESS.attackCard.contextMenu.healing\"),\n\t\t\tcondition: canApply,\n\t\t\ticon: ''\n\t\t},\n\t\t{\n\t\t\tname: 'full',\n\t\t\ticon: '',\n\t\t\tcondition: canApply,\n\t\t\tcallback: (target, li) => applyDamage(li, -1),\n\t\t\tcontent: (li) => `${li[0].querySelector('span').innerText}`\n\t\t}\n\t]\n\n\n\tContextMenu.prototype.bind = Function('\"use strict\"; return ( function ' + ContextMenu.prototype.bind.toString().replace(/this\\.render\\(parent\\)/,`this.render(parent, event)`) + ')')();\n\n\tHooks.on('renderChatLog', (app, html, options) => {\n\t\tnew MessContextMenu(html.find('#chat-log'), \".mess-chat-dmg .mess-dice-result\", contextOptionsRoll);\n\t\tnew MessContextMenu(html.find('#chat-log'), \".mess-chat-dmg .mess-chat-roll-type\", contextOptionsDmg);\n\t})\n\n\tHooks.on('getChatLogEntryContext', function (html, options) {\n\t\tsetProperty(game, 'mess.chatLogEntryContextOptions', options);\n\t\t\n\t\t// Modify existing applies to only work on default rolls and not mess-rolls\n\t\tconst canApply = li => canvas.tokens.controlled.length \n\t\t\t\t\t\t\t\t\t\t\t\t&& li.find(\".dice-roll .dice-result\").length;\n\t\tfor (let i = 1; i < options.length; i++) \n\t\t\toptions[i].condition = canApply;\n\t});\n}\n\nclass MessContextMenu extends ContextMenu {\n\tconstructor(...args) {\n\t\tsuper(...args);\n\n\t\tthis._menuItems = this.menuItems;\n\t}\n\n\trender(target, event) {\n\t\tconst filteredItems = this._menuItems.filter(item => {\n\t\t\tif (!item.condition) return true;\n\t\t\tif (!(item.condition instanceof Function)) return item.condition;\n\t\t\treturn item.condition(target);\n\t\t})\n\n\t\tif (filteredItems.length) event.stopPropagation();\n\t\telse return;\n\t\tthis.menuItems = filteredItems.map(e => {\n\t\t\tif (e.content)\n\t\t\t\te.name = e.content(target);\n\t\t\treturn e;\n\t\t});\n\n let html = $(\"#context-menu\").length ? $(\"#context-menu\") : $('');\n let ol = $('\n\t// \t\t\t\t${num}\n\t// \t\t\t\t${term >= 0 ? '+' + term : term}\n\t// \t\t\t
\n\t// \t\t${game.i18n.localize('MESS.reloadReminder.text')}
`,\n\t\t\tbuttons: {\n\t\t\t\tyes: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tlabel: game.i18n.localize('MESS.reloadReminder.yes'),\n\t\t\t\t\tcallback: () => location.reload(),\n\t\t\t\t},\n\t\t\t\tno: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tlabel: game.i18n.localize('MESS.reloadReminder.no'),\n\t\t\t\t},\n\t\t\t},\n\t\t}).render(true);\n\t\t// game.settings.set('mess', 'templateTexture', mergeObject({}, formData))\n\t}\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/scripts/actor-item-sort-btn.js","webpack:///./src/scripts/add-scrolling.js","webpack:///./src/scripts/change-placeables.js","webpack:///./src/scripts/index.js","webpack:///./src/scripts/modify-templates.js","webpack:///./src/scripts/prepared-spell-tracker.js","webpack:///./src/scripts/settings.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","async","addAlphabeticalSorter","app","html","actor","_id","querySelectorAll","forEach","el","closest","dataset","tab","btn","innerHTML","classList","add","title","style","flex","margin","addEventListener","ev","lists","actorId","fromUuid","concatList","map","items","spells","flat","sort","a","b","siblings","sortUpdates","SortingHelpers","performIntegerSort","duplicate","sortBefore","updateData","u","update","updateEmbeddedEntity","sortItemListAlphabetically","prepend","itemSortBtn","Hooks","on","addScolling","preventDefault","stopPropagation","deltaY","currentTarget","Number","Math","max","$","change","onDragLeftMove","clones","destination","origin","originalEvent","canvas","_onDragCanvasPan","dx","x","dy","y","snap","previous","momentumThreshold","lambda","prev","prevMomentum","momentum","prevV","v","shiftKey","dest","_original","grid","getSnappedPosition","this","layer","options","gridPrecision","refresh","changePlaceables","PlaceableObject","_onDragLeftMove","game","settings","user","isGM","moduleVersion","version","register","default","String","scope","oldVersion","isNewerVersion","mess","init","changeTemplates","newFun","MeasuredTemplate","toString","replace","querySelector","Function","getTargets","isTokenInside","oldFun","ret","dndTemplateSettings","system","id","importedJS","import","AbilityTemplate","itemHook","_originalFromItem","fromItem","item","template","path","getFlag","hasDamage","damage","parts","loadTexture","then","tex","texture","activatePreviewListeners","token","scene","templatePos","startX","width","startY","height","currGrid","shape","contains","tokens","getEmbeddedCollection","targets","updateTokenTargets","div","innerText","i18n","localize","formField","inp","dtype","insertAdjacentHTML","button","_activateFilePicker","after","addPreparedSpellTracker","isNPC","tracker","border","preparedSpells","sep","val","isNaN","setFlag","constructor","alignSelf","parentNode","insertBefore","MessSettings","FormApplication","isDnD","hint","config","Boolean","set","registerMenu","label","icon","restricted","loadTemplates","super","defaultOptions","classes","tabs","navSelector","contentSelector","initial","submitOnClose","btns","_getHeaderButtons","templateTexture","templateAutoTargeting","templateDrawBordersOnlyOnHighlight","getData","dmgTypes","CONFIG","DND5E","damageTypes","templateTypes","types","getSettingsData","activateListeners","formData","expandObject","entries","Dialog","content","buttons","yes","callback","location","reload","no","render"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAK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H/B,KAAM,+BACND,MAAO5F,KAAK8D,KAAKC,SAAS,2BAC1B8D,SAAU,IAAMC,SAASC,UAE3BC,GAAI,CACFnC,KAAM,+BACND,MAAO5F,KAAK8D,KAAKC,SAAS,8BAG7BkE,QAAO","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"bundles/\" + ({\"welcome-screen\":\"welcome-screen\"}[chunkId]||chunkId) + \".\" + {\"welcome-screen\":\"a969\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"modules/mess/scripts/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/scripts/index.js\");\n","async function sortItemListAlphabetically(lists, actorId) {\n\tconst actor = await fromUuid(`Actor.${actorId}`);\n\tlet concatList = lists.map(e => e.items || e.spells).flat();\n\tconcatList.sort(function (a, b) {\n\t\tif (a.name < b.name) return -1;\n\t\tif (a.name > b.name) return 1;\n\t\treturn 0;\n\t});\n\tlet siblings = [concatList.shift()];\n\tlet sortUpdates = [];\n\tfor (; concatList.length > 0; siblings.push(concatList.shift())) {\n\t\tsortUpdates = (SortingHelpers.performIntegerSort(concatList[0], {\n\t\t\ttarget: siblings[siblings.length-1], \n\t\t\tsiblings: duplicate(siblings),\n\t\t\tsortBefore: false}));\t\t\n\t}\n\tconst updateData = sortUpdates.map(u => {\n\t\tlet update = u.update;\n\t\tupdate._id = u.target._id;\n\t\treturn update;\n\t})\n\tactor.updateEmbeddedEntity('OwnedItem', updateData);\n}\n\nasync function addAlphabeticalSorter(app, html, data) {\n\tif (!data.actor._id) return;\n\tconst header = html.querySelectorAll('.filter-list');\n\n\theader.forEach(el => {\n\t\tconst type = el.closest('.tab').dataset.tab;\n\t\tconst btn = document.createElement('a');\n\t\tbtn.innerHTML = '';\n\t\tbtn.classList.add('mess-sort-btn');\n\t\tbtn.title = `Sort ${type} alphabetically.`;\n\t\tbtn.style.flex = 0;\n\t\tbtn.style.margin = \"0 5px 0 0\";\n\t\tbtn.addEventListener('click',\t(ev) => sortItemListAlphabetically(data[type], data.actor._id))\n\t\tel.prepend(btn);\n\t});\n}\n\nexport default async function itemSortBtn() {\n\tHooks.on('renderActorSheet', (app, html, data) => {\n\t\taddAlphabeticalSorter(app, html[0], data);\n\t});\n}","export default async function addScolling() {\n\tHooks.on('renderActorSheet', async function (app, html, data) {\n\t\thtml[0].querySelectorAll('input[data-dtype=\"Number\"], .item-uses input').forEach(el => {\n\t\t\tel.addEventListener('wheel', ev => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tev.stopPropagation();\n\t\t\t\tif (ev.deltaY < 0)\n\t\t\t\t\tev.currentTarget.value = Number(ev.currentTarget.value) + 1;\n\t\t\t\tif (ev.deltaY > 0)\n\t\t\t\t\tev.currentTarget.value = Math.max(Number(ev.currentTarget.value) - 1, 0);\n\n\t\t\t\t$(ev.currentTarget).change()\n\t\t\t});\n\t\t})\n\t});\n}","function onDragLeftMove(event) {\n\tconst {clones, destination, origin, originalEvent} = event.data;\n\n\t// Pan the canvas if the drag event approaches the edge\n\tcanvas._onDragCanvasPan(originalEvent);\n\n\t// Determine dragged distance\n\tconst dx = destination.x - origin.x;\n\tconst dy = destination.y - origin.y;\n\n\tlet snap = false;\n\tif (event.data.previous) {\n\t\t// Interesting would be here how this all behaves for different monitor sizes/performances and when Atro possibly introduces more adaptive rates for mosue movement. \n\t\t// Why? Because currently i just set the timedifferences between function calls to 1. So for 60Hz it behaves same as 30Hz although for 30Hz the distance travelled could be bigger.\n\t\t// All this because i don't want divisions in here for the moment....\n\t\tconst momentumThreshold = 30;\n\t\t// smaller lambda means less \"memory\" => current momentum does have more impact\n\t\t// => more jumping around between snapping and not\n\t\t// but higher means more waiting/slow movement time for it to snap\n\t\tconst lambda = 0.8;\n\t\tconst prev = event.data.previous;\n\t\tconst prevMomentum = event.data.momentum || 0;\n\t\tconst prevV = event.data.v || {x: 0, y: 0};\n\t\tconst v = {\n\t\t\tx: destination.x - prev.x,\n\t\t\ty: destination.y - prev.y\n\t\t}\n\t\tconst momentum = {\n\t\t\tx: v.x - prevV.x,\n\t\t\ty: v.y - prevV.y\n\t\t};\n\n\t\tevent.data.momentum = (momentum.x * momentum.x + momentum.y * momentum.y) + prevMomentum * lambda;\n\t\tsnap = !event.shiftKey && event.data.momentum < momentumThreshold;\n\t}\n\n\tevent.data.previous = destination;\n\n\t// Update the position of each clone\n\tfor ( let c of clones || [] ) {\n\t\tlet dest = {x: c._original.data.x + dx, y: c._original.data.y + dy};\n\t\tif ( snap ) {\n\t\t\tdest = canvas.grid.getSnappedPosition(dest.x, dest.y, this.layer.options.gridPrecision);\n\t\t}\n\t\tc.data.x = dest.x;\n\t\tc.data.y = dest.y;\n\t\tc.refresh();\n\t}\n}\n\nexport function changePlaceables() {\n\tPlaceableObject.prototype._onDragLeftMove = onDragLeftMove;\n\t// Change got bigger than expected, so.. complete swap it is\n}","import { MessSettings } from \"./settings.js\";\nimport { dndTemplateSettings, changeTemplates } from \"./modify-templates.js\";\nimport { changePlaceables } from \"./change-placeables.js\";\nimport itemSortBtn from \"./actor-item-sort-btn.js\";\nimport preparedSpellTracker from \"./prepared-spell-tracker.js\";\nimport addScrolling from \"./add-scrolling.js\";\n\nHooks.on(\"ready\", async function () {\n if (game.settings.get(\"mess\", \"actor-item-sort\")) itemSortBtn();\n if (game.settings.get(\"mess\", \"prepared-spell-tracker\"))\n preparedSpellTracker();\n if (game.settings.get(\"mess\", \"add-scrolling\")) addScrolling();\n\n if (!game.user.isGM) return;\n // Edit next line to match module.\n const module = game.modules.get(\"mess\");\n const title = module.data.title;\n const moduleVersion = module.data.version;\n game.settings.register(title, \"version\", {\n name: `${title} Version`,\n default: \"0.0.0\",\n type: String,\n scope: \"world\",\n });\n const oldVersion = game.settings.get(title, \"version\");\n\n if (!isNewerVersion(moduleVersion, oldVersion)) return;\n\n (\n await import(\n /* webpackChunkName: \"welcome-screen\" */\n \"./welcome-screen.js\"\n )\n ).default();\n});\n\nHooks.on(\"init\", function () {\n game.mess = {};\n MessSettings.init();\n\n dndTemplateSettings();\n changeTemplates();\n if (game.settings.get(\"mess\", \"change-placeables\")) changePlaceables();\n //\tif (game.settings.get('mess', 'better-draggable-lists'))\n //\t\tinitDraggableLists();\n});\n","export function changeTemplates() {\n\t// #MonkeyPatchingFTW\n\t// better than stealing the code, replacing one line and then release it under a/the wrong license..\n\t// Disadvantage: could need more fixing on updates. At least i didn#t make it line based like Kakaroto.. :P\n\n\tlet newFun = MeasuredTemplate.prototype.refresh.toString();\n\n\tif (game.settings.get('mess', 'modify-templates')) {\n\t\tnewFun = newFun.replace(\n\t\t\t/this\\.template\\.beginTextureFill\\(\\{[\\s\\S]*\\}\\)\\;/,\n\t\t\t`\n\t\t\t{\n\t\t\t\tlet mat = PIXI.Matrix.IDENTITY;\n\t\t\t\t// rectangle\n\t\t\t\tif (this.shape.width && this.shape.height)\n\t\t\t\t\tmat.scale(this.shape.width / this.texture.width, this.shape.height / this.texture.height);\n\t\t\t\telse if (this.shape.radius) {\n\t\t\t\t\tmat.scale(this.shape.radius * 2 / this.texture.height, this.shape.radius * 2 / this.texture.width)\n\t\t\t\t\t// Circle center is texture start...\n\t\t\t\t\tmat.translate(-this.shape.radius, -this.shape.radius);\n\t\t\t\t} else if (this.data.t === \"ray\") {\n\t\t\t\t\tconst d = canvas.dimensions,\n\t\t\t\t\t\t\t\theight = this.data.width * d.size / d.distance,\n\t\t\t\t\t\t\t\twidth = this.data.distance * d.size / d.distance;\n\t\t\t\t\tmat.scale(width / this.texture.width, height / this.texture.height);\n\t\t\t\t\tmat.translate(0, -height * 0.5);\n\n\t\t\t\t\tmat.rotate(toRadians(this.data.direction));\n\t\t\t\t} else {// cone\n\t\t\t\t\tconst d = canvas.dimensions;\n\t\t\t\n\t\t\t\t\t// Extract and prepare data\n\t\t\t\t\tlet {direction, distance, angle} = this.data;\n\t\t\t\t\tdistance *= (d.size / d.distance);\n\t\t\t\t\tdirection = toRadians(direction);\n\t\t\t\t\tconst width = this.data.distance * d.size / d.distance;\n\n\t\t\t\t\tconst angles = [(angle/-2), (angle/2)];\n\t\t\t\t\tdistance = distance / Math.cos(toRadians(angle/2));\n\t\t\t\n\t\t\t\t\t// Get the cone shape as a polygon\n\t\t\t\t\tconst rays = angles.map(a => Ray.fromAngle(0, 0, direction + toRadians(a), distance+1));\n\t\t\t\t\tconst height = Math.sqrt((rays[0].B.x - rays[1].B.x) * (rays[0].B.x - rays[1].B.x)\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ (rays[0].B.y - rays[1].B.y) * (rays[0].B.y - rays[1].B.y));\n\t\t\t\t\tmat.scale(width / this.texture.width, height / this.texture.height);\n\t\t\t\t\tmat.translate(0, -height/2)\n\t\t\t\t\tmat.rotate(toRadians(this.data.direction));\n\t\t\t\t}\n\t\t\t\tthis.template.beginTextureFill({\n\t\t\t\t\ttexture: this.texture,\n\t\t\t\t\tmatrix: mat,\n\t\t\t\t\talpha: 0.8\n\t\t\t\t});\n\t\t\t\t// move into draw or so\n\t\t\t\tconst source = getProperty(this.texture, \"baseTexture.resource.source\")\n\t\t\t\tif ( source && (source.tagName === \"VIDEO\") ) {\n\t\t\t\t\tsource.loop = true;\n\t\t\t\t\tsource.muted = true;\n\t\t\t\t\tgame.video.play(source);\n\t\t\t\t}\n\t\t}`\n\t\t);\n\n\t\tHooks.on('renderMeasuredTemplateConfig', (app, html, data) => {\n\t\t\thtml[0].querySelector('.file-picker').dataset.type = 'imagevideo';\n\t\t});\n\t}\n\n\tif (game.settings.get('mess', 'templateDrawBordersOnlyOnHighlight')) {\n\t\tnewFun = newFun.replace(\n\t\t\t/this\\.\\_borderThickness/,\n\t\t\t'this.texture && !this._hover ? 0 : this._borderThickness'\n\t\t);\n\t\tnewFun = newFun.replace(\n\t\t\t/return\\sthis\\;/,\n\t\t\t`\n\t\t\tconst grid = canvas.grid;\n\t\t\t// only show grid highlights on hover\n\t\t\tif (this.texture) {\n\t\t\t\tconst hl = grid.getHighlightLayer(\\`Template.\\$\\{this.id\\}\\`);\n\t\t\t\tif (hl)\n\t\t\t\t\thl.renderable = this._hover;\n\t\t\t}\n\t\t\treturn this;`\n\t\t);\n\t}\n\n\tMeasuredTemplate.prototype.refresh = Function(\n\t\t`\"use strict\"; return ( function ${newFun} )`\n\t)();\n\n\tif (game.settings.get('mess', 'templateAutoTargeting')) {\n\t\tMeasuredTemplate.prototype.getTargets = getTargets;\n\t\tMeasuredTemplate.prototype.isTokenInside = isTokenInside;\n\n\t\tconst oldFun = MeasuredTemplate.prototype._onDragLeftMove;\n\t\tMeasuredTemplate.prototype._onDragLeftMove = function (ev) {\n\t\t\tconst ret = oldFun.bind(this)(ev);\n\n\t\t\tfor (let c of ev.data.clones) this.getTargets(c);\n\n\t\t\treturn ret;\n\t\t};\n\t}\n}\n\nexport async function dndTemplateSettings() {\n\tif (game.system.id !== 'dnd5e') return;\n\n\tconst importedJS = await import(\n\t\t/* webpackIgnore: true */ '/systems/dnd5e/module/pixi/ability-template.js'\n\t);\n\tconst AbilityTemplate = importedJS.default || importedJS.AbilityTemplate;\n\n\t// Auto texture creation from item\n\tif (game.settings.get('mess', 'modify-templates')) {\n\t\tHooks.on('renderItemSheet', itemHook);\n\n\t\tconst _originalFromItem = AbilityTemplate.fromItem;\n\t\tAbilityTemplate.fromItem = function (item) {\n\t\t\tconst template = _originalFromItem.bind(this)(item);\n\n\t\t\t// generate a texture based on the items dmg type, ...\n\t\t\t// Add settings to define custom templates for stuff.\n\t\t\tlet path = item.getFlag('mess', 'templateTexture');\n\t\t\tif (!path && item.hasDamage) {\n\t\t\t\tconst settings = game.settings.get('mess', 'templateTexture') || {};\n\t\t\t\tpath = settings[item.data.data.damage.parts[0][1]] || {};\n\t\t\t\tpath = path[template.data.t];\n\t\t\t}\n\t\t\tif (path)\n\t\t\t\tloadTexture(path).then((tex) => {\n\t\t\t\t\ttemplate.texture = tex;\n\t\t\t\t\ttemplate.data.texture = path;\n\t\t\t\t\ttemplate.refresh();\n\t\t\t\t});\n\t\t\ttemplate.item = item;\n\t\t\treturn template;\n\t\t};\n\t}\n\n\tif (game.settings.get('mess', 'templateAutoTargeting')) {\n\t\t// rather ugly, maybe find a better way at some point :shrug:\n\t\tconst origPrevListeners = AbilityTemplate.prototype.activatePreviewListeners.toString();\n\t\tconst newFun = origPrevListeners.replace(\n\t\t\t/this\\.refresh\\(\\)\\;/,\n\t\t\t// get targets\n\t\t\t`this.refresh();\n\t\t\t\t\t\tthis.getTargets(this);\n\t\t\t\t\t`\n\t\t);\n\n\t\tAbilityTemplate.prototype.getTargets = getTargets;\n\t\tAbilityTemplate.prototype.isTokenInside = isTokenInside;\n\n\t\tAbilityTemplate.prototype.activatePreviewListeners = Function(\n\t\t\t`\"use strict\"; return ( function ${newFun} )`\n\t\t)();\n\t}\n}\n\nfunction isTokenInside(token) {\n\tconst grid = canvas.scene.data.grid,\n\t\ttemplatePos = { x: this.data.x, y: this.data.y };\n\t// Check for center of each square the token uses.\n\t// e.g. for large tokens all 4 squares\n\tconst startX = token.width >= 1 ? 0.5 : token.width / 2;\n\tconst startY = token.height >= 1 ? 0.5 : token.height / 2;\n\tfor (let x = startX; x < token.width; x++) {\n\t\tfor (let y = startY; y < token.height; y++) {\n\t\t\tconst currGrid = {\n\t\t\t\tx: token.x + x * grid - templatePos.x,\n\t\t\t\ty: token.y + y * grid - templatePos.y,\n\t\t\t};\n\t\t\tconst contains = this.shape.contains(currGrid.x, currGrid.y);\n\t\t\tif (contains) return true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getTargets(template) {\n\tconst tokens = canvas.scene.getEmbeddedCollection('Token');\n\tlet targets = [];\n\n\tfor (const token of tokens)\n\t\tif (template.isTokenInside(token)) {\n\t\t\ttargets.push(token._id);\n\t\t}\n\tgame.user.updateTokenTargets(targets);\n}\n\nasync function itemHook(app, html) {\n\tconst div = document.createElement('div');\n\tdiv.classList.add('form-group');\n\tdiv.appendChild(\n\t\tdocument.createElement('label')\n\t).innerText = game.i18n.localize('MESS.itemSheet.templateTexture');\n\tconst formField = div.appendChild(document.createElement('div'));\n\tformField.classList.add('form-fields');\n\tconst inp = formField.appendChild(document.createElement('input'));\n\tinp.dataset.dtype = 'String';\n\tinp.type = 'text';\n\tinp.name = 'flags.mess.templateTexture';\n\tinp.value = app.object.getFlag('mess', 'templateTexture') || '';\n\n\tformField.insertAdjacentHTML(\n\t\t'beforeend',\n\t\t`\n\t\t\n\t`\n\t);\n\tconst button = formField.querySelector('button');\n\tbutton.style.flex = '0';\n\tapp._activateFilePicker(button);\n\tconst target = html[0].querySelector('[name=\"data.target.units\"]');\n\tif (target) target.closest('.form-group').after(div);\n}\n","export default async function addPreparedSpellTracker() {\n\tHooks.on('renderActorSheet', async function (app, html, data) {\n\t\tconst actor = await fromUuid(`Actor.${data.actor._id}`);\n\t\tif (actor.isNPC) return;\n\t\t\n\t\tconst spellDc = html[0].querySelector('.spell-dc');\n\t\tif (!spellDc) return;\n\t\tlet tracker = document.createElement('div');\n\t\ttracker.classList.add('spell-detail');\n\t\ttracker.classList.add('spell-slots');\n\t\ttracker.style.flex = '1';\n\t\ttracker.style.border = 'none';\n\t\tconst spanPrep = tracker.appendChild(document.createElement('span'));\n\t\tspanPrep.innerText = `${game.i18n.localize('MESS.actorSheet.preparedSpellTracker')}: ${data.preparedSpells}`;\n\n\t\tconst sep = tracker.appendChild(document.createElement('span'));\n\t\tsep.innerText = ' / ';\n\t\tsep.classList.add('sep');\n\n\t\tconst max = tracker.appendChild(document.createElement('input'));\n\t\tmax.type = 'text';\n\t\tmax.value = actor.getFlag('mess', 'maxPreparedSpells') || 0;\n\t\tmax.addEventListener('change', async function(ev) {\n\t\t\tev.preventDefault();\n\t\t\tev.stopPropagation();\n\t\t\tconst val = Number(ev.currentTarget.value);\n\t\t\tif (isNaN(val)) {\n\t\t\t\tev.currentTarget.value = actor.getFlag('mess', 'maxPreparedSpells') || 0;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tactor.setFlag('mess', 'maxPreparedSpells', val);\n\t\t\treturn false;\n\t\t});\n\t\t\n\t\tif (app.constructor.name === 'Tidy5eSheet') {\n\t\t\tconst el = html[0].querySelector('.spellcasting-ability');\n\t\t\tif (!el)\n\t\t\t\treturn;\n\t\t\tel.appendChild(tracker, el);\n\t\t} else {\n\t\t\tconst el = html[0].querySelector('.spellbook .inventory-list');\n\t\t\tif (!el)\treturn;\n\t\t\ttracker.style.flex = '0';\n\t\t\ttracker.style.alignSelf = 'flex-start';\n\t\t\ttracker.style.margin = '0 8px';\n\t\t\tel.parentNode.insertBefore(tracker, el);\n\t\t}\n\t});\n}","export class MessSettings extends FormApplication {\n static init() {\n const isDnD = game.system.id === \"dnd5e\";\n\n game.settings.register(\"mess\", \"actor-item-sort\", {\n name: \"Activate item sort button.\",\n hint:\n \"Adds a button to actor sheets for sorting all items of that category alphabetically.\",\n scope: \"world\",\n config: false,\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"better-draggable\", {\n name: \"Activate better drag'n'drop workflow.\",\n scope: \"world\",\n config: false, // Change if implemented\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"better-draggable-lists\", {\n name: \"Activate better drag'n'drop workflow for lists.\",\n scope: \"world\",\n config: false,\n default: true,\n type: Boolean,\n });\n game.settings.set(\"mess\", \"better-draggable-lists\", false);\n\n game.settings.register(\"mess\", \"prepared-spell-tracker\", {\n name: \"Activate prepared spell tracker\",\n hint:\n \"Adds a tracker to the spellbook tab, providing a way to track the allowed maximum of prepared spells.\",\n scope: \"world\",\n config: false,\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"add-scrolling\", {\n name: \"Activating numerical field scrolling.\",\n hint:\n \"Lets you in-/decrease numerical fields in the Actor sheet using the mouse wheel when focused.\",\n scope: \"world\",\n config: false,\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"modify-rolling\", {\n name: \"Alternative Rolling.\",\n hint:\n \"Changes the way rolling is displayed and executed for DnD5e. Reload for all connected clients is required for this to take effect if changed!\",\n scope: \"world\",\n config: false,\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"attack-card-always-public\", {\n name: \"Roll mode for alternative rolling.\",\n hint:\n \"Always roll attack rolls public, with hidden rolls, but visible target.\",\n scope: \"world\",\n config: false,\n default: isDnD,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"modify-templates\", {\n name: \"Activate modified templates.\",\n hint:\n \"Makes templates texture fill scaling instead of tiling and does allow the usage of videos as texture. Reload for all connected clients is required for this to take effect if changed!\",\n scope: \"world\",\n config: false,\n default: true,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"change-placeables\", {\n name: \"Activate placeables changes.\",\n hint:\n \"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!\",\n scope: \"world\",\n config: false,\n default: true,\n type: Boolean,\n });\n game.settings.registerMenu(\"mess\", \"templateTexture\", {\n name: game.i18n.localize(\"MESS.FVTTSettings.description\"),\n label: game.i18n.localize(\"MESS.FVTTSettings.button\"),\n icon: \"fas fa-mug-hot\",\n type: MessSettings,\n restricted: true,\n });\n\n game.settings.register(\"mess\", \"templateTexture\", {\n name: \"Activate placeables changes.\",\n hint:\n \"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!\",\n scope: \"world\",\n default: true,\n type: Object,\n });\n\n game.settings.register(\"mess\", \"max-critical\", {\n name: \"Activate maximum critical rolls.\",\n hint:\n \"Changes behaviour of critical damage rolls to maximize the damage of the extra dice for criticals!\",\n scope: \"world\",\n config: false,\n default: false,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"templateTexture\", {\n name: \"Activate placeables changes.\",\n hint:\n \"Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!\",\n scope: \"world\",\n config: false,\n default: true,\n type: Object,\n });\n\n game.settings.register(\"mess\", \"templateAutoTargeting\", {\n scope: \"world\",\n default: true,\n type: Boolean,\n });\n\n game.settings.register(\"mess\", \"templateDrawBordersOnlyOnHighlight\", {\n scope: \"world\",\n default: true,\n type: Boolean,\n });\n\n this.loadTemplates();\n }\n static loadTemplates() {\n loadTemplates([\n \"modules/mess/templates/settings/templates.html\",\n \"modules/mess/templates/settings/dnd5e.html\",\n \"modules/mess/templates/settings/misc.html\",\n ]);\n }\n\n static get defaultOptions() {\n return {\n ...super.defaultOptions,\n template: \"modules/mess/templates/settings/settings.html\",\n height: \"auto\",\n title: \"Mess - Moerills enhancing super-suit(e) - Settings Menu\",\n width: 600,\n classes: [\"mess\", \"settings\"],\n tabs: [\n {\n navSelector: \".tabs\",\n contentSelector: \"form\",\n initial: \"name\",\n },\n ],\n submitOnClose: true,\n };\n }\n\n constructor(object = {}, options) {\n super(object, options);\n this.object = game.settings.get(\"mess\", \"templateTexture\");\n }\n\n _getHeaderButtons() {\n let btns = super._getHeaderButtons();\n btns[0].label = \"Save & Close\";\n return btns;\n }\n\n getSettingsData() {\n const isDnD = game.system.id === \"dnd5e\";\n let data = {\n \"modify-templates\": game.settings.get(\"mess\", \"modify-templates\"),\n \"change-placeables\": game.settings.get(\"mess\", \"change-placeables\"),\n templateTexture: game.settings.get(\"mess\", \"templateTexture\"),\n templateAutoTargeting: game.settings.get(\"mess\", \"templateAutoTargeting\"),\n templateDrawBordersOnlyOnHighlight: game.settings.get(\n \"mess\",\n \"templateDrawBordersOnlyOnHighlight\"\n ),\n \"better-draggable-lists\": game.settings.get(\n \"mess\",\n \"better-draggable-lists\"\n ),\n };\n if (isDnD) {\n data[\"templateTexture\"] = game.settings.get(\"mess\", \"templateTexture\");\n data[\"modify-rolling\"] = game.settings.get(\"mess\", \"modify-rolling\");\n data[\"max-critical\"] = game.settings.get(\"mess\", \"max-critical\");\n\n data[\"actor-item-sort\"] = game.settings.get(\"mess\", \"actor-item-sort\");\n // data['better-draggable'] = game.settings.get('mess', 'better-draggable');\n data[\"prepared-spell-tracker\"] = game.settings.get(\n \"mess\",\n \"prepared-spell-tracker\"\n );\n data[\"add-scrolling\"] = game.settings.get(\"mess\", \"add-scrolling\");\n data[\"attack-card-always-public\"] = game.settings.get(\n \"mess\",\n \"attack-card-always-public\"\n );\n }\n return data;\n }\n\n getData() {\n const isDnD = game.system.id === \"dnd5e\";\n let data = super.getData();\n if (isDnD) {\n data.dmgTypes = CONFIG.DND5E.damageTypes;\n data.templateTypes = CONFIG.MeasuredTemplate.types;\n }\n data.isDnD = isDnD;\n data.settings = this.getSettingsData();\n return data;\n }\n\n activateListeners(html) {\n super.activateListeners(html);\n }\n\n _updateObject(ev, formData) {\n const data = expandObject(formData);\n for (let [key, value] of Object.entries(data)) {\n game.settings.set(\"mess\", key, value);\n }\n new Dialog({\n content: `${game.i18n.localize(\"MESS.reloadReminder.text\")}
`,\n buttons: {\n yes: {\n icon: '',\n label: game.i18n.localize(\"MESS.reloadReminder.yes\"),\n callback: () => location.reload(),\n },\n no: {\n icon: '',\n label: game.i18n.localize(\"MESS.reloadReminder.no\"),\n },\n },\n }).render(true);\n // game.settings.set('mess', 'templateTexture', mergeObject({}, formData))\n }\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/templates/settings/dnd5e.html b/dist/templates/settings/dnd5e.html index 6a960a7..d906d61 100644 --- a/dist/templates/settings/dnd5e.html +++ b/dist/templates/settings/dnd5e.html @@ -15,16 +15,5 @@This feature got removed and replaced by a new and improved version in Mars 5e.
+But where are the autorolls? Don't worry, they'll be there, soon.
\ No newline at end of file diff --git a/dist/templates/welcome-screen.html b/dist/templates/welcome-screen.html index 200471a..759d6a8 100644 --- a/dist/templates/welcome-screen.html +++ b/dist/templates/welcome-screen.html @@ -7,9 +7,10 @@ } -This update is only a quick fix for making the rolling system work again for FVTT 0.7.5. My plans are taking to long, so i wanted to at least make the module work again in 0.7.5.
- Please check the GitHubs issue board if you want to stay up to date on my plans and progress!
This update removes Mess rolling modifications for 5e. (For everyone else nothing changes)!
+If you liked those changes, do not fear, i reworked them and put them into its own module, with improved design, features, code base, ...! The new module is called Mars 5e.
+It is not the same as MESS, but its the way i wanted to go and keep going. Its still missing automatic rolling, but this feature is planned for the next big(ger) update.
Best regards,
Moerill
${game.i18n.localize('MESS.reloadReminder.text')}
`, - buttons: { - yes: { - icon: '', - label: game.i18n.localize('MESS.reloadReminder.yes'), - callback: () => location.reload(), - }, - no: { - icon: '', - label: game.i18n.localize('MESS.reloadReminder.no'), - }, - }, - }).render(true); - // game.settings.set('mess', 'templateTexture', mergeObject({}, formData)) - } + static init() { + const isDnD = game.system.id === "dnd5e"; + + game.settings.register("mess", "actor-item-sort", { + name: "Activate item sort button.", + hint: + "Adds a button to actor sheets for sorting all items of that category alphabetically.", + scope: "world", + config: false, + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "better-draggable", { + name: "Activate better drag'n'drop workflow.", + scope: "world", + config: false, // Change if implemented + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "better-draggable-lists", { + name: "Activate better drag'n'drop workflow for lists.", + scope: "world", + config: false, + default: true, + type: Boolean, + }); + game.settings.set("mess", "better-draggable-lists", false); + + game.settings.register("mess", "prepared-spell-tracker", { + name: "Activate prepared spell tracker", + hint: + "Adds a tracker to the spellbook tab, providing a way to track the allowed maximum of prepared spells.", + scope: "world", + config: false, + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "add-scrolling", { + name: "Activating numerical field scrolling.", + hint: + "Lets you in-/decrease numerical fields in the Actor sheet using the mouse wheel when focused.", + scope: "world", + config: false, + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "modify-rolling", { + name: "Alternative Rolling.", + hint: + "Changes the way rolling is displayed and executed for DnD5e. Reload for all connected clients is required for this to take effect if changed!", + scope: "world", + config: false, + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "attack-card-always-public", { + name: "Roll mode for alternative rolling.", + hint: + "Always roll attack rolls public, with hidden rolls, but visible target.", + scope: "world", + config: false, + default: isDnD, + type: Boolean, + }); + + game.settings.register("mess", "modify-templates", { + name: "Activate modified templates.", + hint: + "Makes templates texture fill scaling instead of tiling and does allow the usage of videos as texture. Reload for all connected clients is required for this to take effect if changed!", + scope: "world", + config: false, + default: true, + type: Boolean, + }); + + game.settings.register("mess", "change-placeables", { + name: "Activate placeables changes.", + hint: + "Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!", + scope: "world", + config: false, + default: true, + type: Boolean, + }); + game.settings.registerMenu("mess", "templateTexture", { + name: game.i18n.localize("MESS.FVTTSettings.description"), + label: game.i18n.localize("MESS.FVTTSettings.button"), + icon: "fas fa-mug-hot", + type: MessSettings, + restricted: true, + }); + + game.settings.register("mess", "templateTexture", { + name: "Activate placeables changes.", + hint: + "Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!", + scope: "world", + default: true, + type: Object, + }); + + game.settings.register("mess", "max-critical", { + name: "Activate maximum critical rolls.", + hint: + "Changes behaviour of critical damage rolls to maximize the damage of the extra dice for criticals!", + scope: "world", + config: false, + default: false, + type: Boolean, + }); + + game.settings.register("mess", "templateTexture", { + name: "Activate placeables changes.", + hint: + "Changes some behaviours of placeables, like preview snapping to grid. Reload for all connected clients is required for this to take effect if changed!", + scope: "world", + config: false, + default: true, + type: Object, + }); + + game.settings.register("mess", "templateAutoTargeting", { + scope: "world", + default: true, + type: Boolean, + }); + + game.settings.register("mess", "templateDrawBordersOnlyOnHighlight", { + scope: "world", + default: true, + type: Boolean, + }); + + this.loadTemplates(); + } + static loadTemplates() { + loadTemplates([ + "modules/mess/templates/settings/templates.html", + "modules/mess/templates/settings/dnd5e.html", + "modules/mess/templates/settings/misc.html", + ]); + } + + static get defaultOptions() { + return { + ...super.defaultOptions, + template: "modules/mess/templates/settings/settings.html", + height: "auto", + title: "Mess - Moerills enhancing super-suit(e) - Settings Menu", + width: 600, + classes: ["mess", "settings"], + tabs: [ + { + navSelector: ".tabs", + contentSelector: "form", + initial: "name", + }, + ], + submitOnClose: true, + }; + } + + constructor(object = {}, options) { + super(object, options); + this.object = game.settings.get("mess", "templateTexture"); + } + + _getHeaderButtons() { + let btns = super._getHeaderButtons(); + btns[0].label = "Save & Close"; + return btns; + } + + getSettingsData() { + const isDnD = game.system.id === "dnd5e"; + let data = { + "modify-templates": game.settings.get("mess", "modify-templates"), + "change-placeables": game.settings.get("mess", "change-placeables"), + templateTexture: game.settings.get("mess", "templateTexture"), + templateAutoTargeting: game.settings.get("mess", "templateAutoTargeting"), + templateDrawBordersOnlyOnHighlight: game.settings.get( + "mess", + "templateDrawBordersOnlyOnHighlight" + ), + "better-draggable-lists": game.settings.get( + "mess", + "better-draggable-lists" + ), + }; + if (isDnD) { + data["templateTexture"] = game.settings.get("mess", "templateTexture"); + data["modify-rolling"] = game.settings.get("mess", "modify-rolling"); + data["max-critical"] = game.settings.get("mess", "max-critical"); + + data["actor-item-sort"] = game.settings.get("mess", "actor-item-sort"); + // data['better-draggable'] = game.settings.get('mess', 'better-draggable'); + data["prepared-spell-tracker"] = game.settings.get( + "mess", + "prepared-spell-tracker" + ); + data["add-scrolling"] = game.settings.get("mess", "add-scrolling"); + data["attack-card-always-public"] = game.settings.get( + "mess", + "attack-card-always-public" + ); + } + return data; + } + + getData() { + const isDnD = game.system.id === "dnd5e"; + let data = super.getData(); + if (isDnD) { + data.dmgTypes = CONFIG.DND5E.damageTypes; + data.templateTypes = CONFIG.MeasuredTemplate.types; + } + data.isDnD = isDnD; + data.settings = this.getSettingsData(); + return data; + } + + activateListeners(html) { + super.activateListeners(html); + } + + _updateObject(ev, formData) { + const data = expandObject(formData); + for (let [key, value] of Object.entries(data)) { + game.settings.set("mess", key, value); + } + new Dialog({ + content: `${game.i18n.localize("MESS.reloadReminder.text")}
`, + buttons: { + yes: { + icon: '', + label: game.i18n.localize("MESS.reloadReminder.yes"), + callback: () => location.reload(), + }, + no: { + icon: '', + label: game.i18n.localize("MESS.reloadReminder.no"), + }, + }, + }).render(true); + // game.settings.set('mess', 'templateTexture', mergeObject({}, formData)) + } } diff --git a/src/templates/settings/dnd5e.html b/src/templates/settings/dnd5e.html index 6a960a7..d906d61 100644 --- a/src/templates/settings/dnd5e.html +++ b/src/templates/settings/dnd5e.html @@ -15,16 +15,5 @@This feature got removed and replaced by a new and improved version in Mars 5e.
+But where are the autorolls? Don't worry, they'll be there, soon.
\ No newline at end of file diff --git a/src/templates/welcome-screen.html b/src/templates/welcome-screen.html index 200471a..759d6a8 100644 --- a/src/templates/welcome-screen.html +++ b/src/templates/welcome-screen.html @@ -7,9 +7,10 @@ } -This update is only a quick fix for making the rolling system work again for FVTT 0.7.5. My plans are taking to long, so i wanted to at least make the module work again in 0.7.5.
- Please check the GitHubs issue board if you want to stay up to date on my plans and progress!
This update removes Mess rolling modifications for 5e. (For everyone else nothing changes)!
+If you liked those changes, do not fear, i reworked them and put them into its own module, with improved design, features, code base, ...! The new module is called Mars 5e.
+It is not the same as MESS, but its the way i wanted to go and keep going. Its still missing automatic rolling, but this feature is planned for the next big(ger) update.
Best regards,
Moerill