mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 16:23:37 +08:00
f784f48906
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
1 line
13 KiB
Plaintext
Generated
1 line
13 KiB
Plaintext
Generated
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,kC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,mC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,uC,aCA5D,MAAM,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,UAAWb,KAAKa,aACfY,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BZ,EAAEa,QAAQ,GAEd,GCfA,IAAAhB,QAAO,cAA+B,iBAAiB,SAAUiB,IAC3D,oBAAoB,MAAc,oBAAoB,OACxDA,EAAOC,QAAQC,KAAK,YAExB,KACA,IAAAnB,QAAO,cAA8B,aAAa,SAAUM,GAC1D,MAAMC,EAAalB,KAAKC,MAAMiB,WAC9B,GAAIA,EAAWL,aAAeb,KAAKC,MAAM2B,OAAOG,IAAMb,EAAWc,qBAAsB,CACrF,MAAMC,EAAYf,EAAWe,YAC7B,GAAIA,EAAW,CACb,MAAMC,GAAU,IAAAC,UAASF,EAAUG,eAAgB,KAGnDnB,EAAMZ,IAAI,UAAWS,EAAE,MAAO,KAAMoB,IAAW,IACjD,CACF,CACF,KCpBA,IAAAvB,QAAO,cAA8B,gBAAgB,SAAUV,GACzDD,KAAKC,MAAMiB,WAAWL,aACxBZ,EAAMoC,UAAY,IAAUpC,EAAMoC,UAAW,8BAEjD,GJEgB,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/sticky/./src/common/query/discussions/StickyGambit.ts","webpack://@flarum/sticky/./src/common/extend.ts","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n descriptionKey() {\n return this.attrs.post.content().sticky ? 'flarum-sticky.forum.post_stream.discussion_stickied_text' : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\nflarum.reg.add('flarum-sticky', 'forum/components/DiscussionStickiedPost', DiscussionStickiedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { BooleanGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class StickyGambit extends BooleanGambit {\n key() {\n return app.translator.trans('flarum-sticky.lib.gambits.discussions.sticky.key', {}, true);\n }\n filterKey() {\n return 'sticky';\n }\n}\nflarum.reg.add('flarum-sticky', 'common/query/discussions/StickyGambit', StickyGambit);","import Extend from 'flarum/common/extenders';\nimport StickyGambit from './query/discussions/StickyGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', StickyGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionStickied', DiscussionStickiedPost), new Extend.Model(Discussion) //\n.attribute('isSticky').attribute('canSticky')];","import app from 'flarum/forum/app';\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add('sticky', m(Badge, {\n type: \"sticky\",\n label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),\n icon: \"fas fa-thumbtack\"\n }), 10);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add('sticky', m(Button, {\n icon: \"fas fa-thumbtack\",\n onclick: this.stickyAction.bind(discussion)\n }, app.translator.trans(\"flarum-sticky.forum.discussion_controls.\".concat(discussion.isSticky() ? 'unsticky' : 'sticky', \"_button\"))));\n }\n });\n DiscussionControls.stickyAction = function () {\n this.save({\n isSticky: !this.isSticky()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\nexport default function addStickyExcerpt() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in <div> because ItemList entries need to be vnodes\n items.add('excerpt', m(\"div\", null, excerpt), -100);\n }\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nexport default function addStickyClass() {\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.discussion.isSticky()) {\n attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n }\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionStickiedPost","icon","descriptionKey","this","attrs","post","content","sticky","add","StickyGambit","BooleanGambit","filterKey","gambit","attribute","extend","badges","isSticky","m","type","label","items","discussion","canSticky","onclick","stickyAction","bind","concat","save","then","update","redraw","params","include","push","q","lastReadPostNumber","firstPost","excerpt","truncate","contentPlain","className"],"sourceRoot":""} |