Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
d12aa3d
Reorg profile-data.sql.js
pfrazee Dec 6, 2018
0a4e01f
Add the beaker.posts and beaker.followgraph API skeletons
pfrazee Dec 6, 2018
428568f
Implement the majority of the crawler (WIP)
pfrazee Dec 7, 2018
36e1f9e
Implement post and follows crawlers
pfrazee Dec 7, 2018
f592ca2
Add write methods to crawler posts and followgraph
pfrazee Dec 8, 2018
bd11231
Implement remaining crawler logic
pfrazee Dec 8, 2018
8af6f4f
Implement followgraph web api
pfrazee Dec 8, 2018
cfd8a6a
Add posts web api
pfrazee Dec 8, 2018
1f22b4d
Add crawler sqlite delta
pfrazee Dec 8, 2018
d7b3fa2
Add userSessionAPI interface
pfrazee Dec 8, 2018
3f3400b
Add getUserSession/setUserSession to beaker.browser api
pfrazee Dec 8, 2018
1eb42a6
Fixes
pfrazee Dec 9, 2018
99d71ec
Fixes
pfrazee Dec 9, 2018
462427d
Fixes
pfrazee Dec 10, 2018
a79a5f6
Crawler fixes, particularly around the changes watcher
pfrazee Dec 10, 2018
c08bcc3
Give better author info in posts responses
pfrazee Dec 10, 2018
fc8a52a
Correctly handle get() that doesnt have content
pfrazee Dec 10, 2018
6252f9b
Normalize the URL provided by the users api
pfrazee Dec 10, 2018
85c9f3c
More consistent URL normalization
pfrazee Dec 10, 2018
b23ef93
Create folders as needed
pfrazee Dec 10, 2018
e9b33ba
Fixes
pfrazee Dec 10, 2018
bc4bbbb
Fixes to followgraph crawler
pfrazee Dec 10, 2018
3495ba1
Fixes to crawler
pfrazee Dec 10, 2018
6b6dab7
Add authors param to beaker.posts.list
pfrazee Dec 10, 2018
1461a5f
More consistent URL normalization in followgraph
pfrazee Dec 10, 2018
2848a52
Correctly get last ID of inserts
pfrazee Dec 10, 2018
b155908
Add readFile and showEditProfileModal to beaker.browser
pfrazee Dec 10, 2018
1ab95a6
Fix first follow()
pfrazee Dec 13, 2018
f6c30ec
Add site-descriptions to crawler
pfrazee Dec 13, 2018
041b7bc
Add more export functions to daemon
pfrazee Dec 13, 2018
d9e86aa
Fixes to the site-descriptions and FoaF algorithms
pfrazee Dec 13, 2018
bb4b16a
Add more options and data to followgraph list functions
pfrazee Dec 13, 2018
4ef0203
Bump deps
pfrazee Dec 14, 2018
e0caefe
Add {followedBy} filter to followgraph
pfrazee Dec 14, 2018
d9ed012
Add .followsUser output to followgraph queries
pfrazee Dec 14, 2018
9f53480
Filter out the subject from listFoaFs
pfrazee Dec 15, 2018
8581969
Add beaker.browser.showShellModal
pfrazee Dec 16, 2018
78a3c7f
Add beaker.crawler API
pfrazee Dec 17, 2018
2cdcd3d
Add beaker.crawler.crawlSite
pfrazee Dec 18, 2018
2d80897
Enable foreign keys in sqlite
pfrazee Dec 18, 2018
c13cf91
Rework crawler progress events
pfrazee Dec 18, 2018
2b562f6
Add beaker.templates internal web api
pfrazee Dec 23, 2018
76b3189
Fix limit/offset part of queries
pfrazee Dec 24, 2018
1cd71bf
Fix {authors} handling of posts.list
pfrazee Dec 24, 2018
d25d940
Add ?disable_fallback_page QP to dat://
pfrazee Dec 24, 2018
80d945f
dat:// - look for file extensions based on Accept header
pfrazee Dec 27, 2018
4e45caa
Fix exception when no Accept header is set
pfrazee Jan 1, 2019
2bca05f
Fix dat download-as-zip
pfrazee Jan 1, 2019
a8453d0
Add beaker.crawler.listSuggestions
pfrazee Jan 3, 2019
07d703f
Rename feed -> timeline
pfrazee Jan 4, 2019
d42556b
Split search results into types
pfrazee Jan 4, 2019
5763d0c
Add beaker.crawler.listSearchResults and FTS indexes
pfrazee Jan 10, 2019
8bab9d1
Update the known_sites implementation to use folder-based captures an…
pfrazee Jan 11, 2019
c0419be
Move crawler to a priority queueing system
pfrazee Jan 12, 2019
e6b8a81
More JSDoc type annotations
pfrazee Jan 12, 2019
53ae755
Add jsdocs to the database scripts
pfrazee Jan 13, 2019
56fbc20
Add jsdoc annotations to lib scripts
pfrazee Jan 13, 2019
43a1154
Add some more jsdoc annotations to the dat code (not 100% done)
pfrazee Jan 14, 2019
634a802
Add published-sites to crawler and implement pages search
pfrazee Jan 14, 2019
5f6c8d6
Add image-collection and file-share sites to search output
pfrazee Jan 15, 2019
57c5c15
Add site publishing to the beaker.archives api
pfrazee Jan 15, 2019
44041f6
Fix: include search results (published sites) by the user
pfrazee Jan 15, 2019
8102e29
Fix: crawl the user
pfrazee Jan 15, 2019
85f7ec1
Add isPublished to trusted archive getInfo response
pfrazee Jan 15, 2019
a7dd47e
Handle 'all'-type searches better
pfrazee Jan 16, 2019
b3fc151
Disable the timeline links for now
pfrazee Jan 20, 2019
c34df50
Introduce new logger
pfrazee Jan 20, 2019
16db292
Add beaker.logger web api
pfrazee Jan 21, 2019
78a1e7d
Fixes to the logfile query and add log rotation
pfrazee Jan 21, 2019
430762b
Implement beaker.logger.stream
pfrazee Jan 21, 2019
ab3d7c0
Add sort option to logger query
pfrazee Jan 21, 2019
3fe93d2
Cleanup
pfrazee Jan 21, 2019
e0e6a00
Refine the logging statements
pfrazee Jan 21, 2019
ccea171
Add logging to the dat components
pfrazee Jan 22, 2019
6129c5d
Tweak dat logging
pfrazee Jan 22, 2019
16b0dac
Rework posts to be links
pfrazee Jan 24, 2019
30333d6
Formatting
pfrazee Jan 24, 2019
9d764b7
Temporary type filtering in search
pfrazee Jan 24, 2019
64f08b9
Add scripts/import-schemas.js
pfrazee Jan 27, 2019
a369f56
Update json schemas
pfrazee Jan 27, 2019
4c9e042
Update crawler and apis to use new unwalled.garden schemas
pfrazee Jan 28, 2019
58c58c0
Rewrite crawler search queries using knex and implement dataset/siteT…
pfrazee Jan 28, 2019
b6fd28f
Expand dat helper functions
pfrazee Jan 28, 2019
1f8e3ec
Automatically use known site types when creating link-posts
pfrazee Jan 28, 2019
6006fda
Add more options to followgraph queries
pfrazee Jan 29, 2019
64a3fe5
Update crawler.listSearchResults output to include recordFilename
pfrazee Jan 30, 2019
c01ebb1
Per the unwalled.garden spec update, change known_sites to known-sites
pfrazee Jan 30, 2019
9477fb3
Render markdown as HTML when served over dat://
pfrazee Feb 8, 2019
742ae07
Fix: only respond with the error page when HTML is requested in the d…
pfrazee Feb 10, 2019
67f4449
Merge branch 'master' into blue
pfrazee Feb 11, 2019
7e444ec
Add domainNames DB and API
pfrazee Feb 15, 2019
fcb9d50
Add navigator.importSystemAPI() and move bookmarks into that system
pfrazee Feb 15, 2019
bb6999d
Remove 'published sites'
pfrazee Feb 19, 2019
500bb6f
Replace link-posts with posts
pfrazee Feb 19, 2019
75b5a8a
Always write unwalled.garden json records with 2-space indentation, f…
pfrazee Feb 19, 2019
b5681a7
Add 'library' importable web api
pfrazee Feb 19, 2019
6324035
Fix opts.filter -> opts.filters
pfrazee Feb 19, 2019
87bc2a2
Improve type annotations in library web api
pfrazee Feb 19, 2019
9be497a
Add type annotations to bookmarks api and change filters.isPinned to …
pfrazee Feb 19, 2019
7aa4f08
Add 'profiles' importable web api
pfrazee Feb 19, 2019
a0b06ad
Add 'unwalled-garden-feed' importable web api
pfrazee Feb 19, 2019
22d66c6
Add 'unwalled-garden-followgraph' importable web api
pfrazee Feb 20, 2019
eb79652
Update license year
pfrazee Feb 20, 2019
12f3f1c
Add profiles.openProfileEditor()
pfrazee Feb 20, 2019
4473d76
Add feed app to default relative domains
pfrazee Feb 21, 2019
1cf87ca
Add 'search' importable web api
pfrazee Feb 21, 2019
55459cc
Fix the sorting of the search output
pfrazee Feb 21, 2019
6ccb6d7
Improve non-FQDN lookup times by checking local mappings before the s…
pfrazee Feb 21, 2019
93ec486
Fix bug in listFollowers() call
pfrazee Feb 22, 2019
7590f00
Get the best description possible when listing follows (not just the …
pfrazee Feb 22, 2019
ca800d8
Remove legacy 'dat type' code
pfrazee Feb 22, 2019
f8e3c21
Remove custom dat:// domain names (nice thought, not ready)
pfrazee Mar 5, 2019
ba98255
Remove leftover domain-names code
pfrazee Mar 6, 2019
c6d0445
Markdown styles update: centering
pfrazee Mar 6, 2019
c1de984
Handle hostnames in the archives and library web apis
pfrazee Mar 11, 2019
e541e44
Rename .preview to .previewEnabled in library API
pfrazee Mar 12, 2019
d5af82b
Return a post object in the feed.addPost and .editPost web apis
pfrazee Mar 12, 2019
3e9cdef
Fix url handling in feed edit/delete apis
pfrazee Mar 12, 2019
96bbca2
Fix: Correctly lookup updated posts in the feed crawler
pfrazee Mar 12, 2019
3027a2c
Improve handling of notfound archives
pfrazee Mar 12, 2019
b504936
Add .index() to profiles web api
pfrazee Mar 12, 2019
551a1c0
Normalize the url returned by the profiles web api
pfrazee Mar 13, 2019
e16ecfe
Remove profiles.openProfileEditor web api
pfrazee Mar 14, 2019
8c875ea
Remove the twitter and explore default bookmarks
pfrazee Mar 15, 2019
71794a7
Dont pin default bookmarks
pfrazee Mar 17, 2019
e387ceb
Tweak some type annotations
pfrazee Mar 18, 2019
aed1ff3
Merge branch 'master' into blue
pfrazee Mar 18, 2019
3c0dc27
Excise invalid users on startup
pfrazee Mar 18, 2019
d2529ee
Add unwalled.garden/bookmark to the crawler and APIs
pfrazee Mar 25, 2019
32e751b
Merge branch 'master' into blue
pfrazee Mar 26, 2019
33d7abd
Rework bookmarks web api to include public bookmarks
pfrazee Mar 26, 2019
00fe113
Protect the user archives from deletion
pfrazee Mar 27, 2019
42e384f
Add dryRun option to DatArchive.importFromFilesystem
pfrazee Mar 29, 2019
0ec9055
Rename unwalled-garden-feed API to unwalled-garden-posts
pfrazee Apr 1, 2019
16ef58e
Remove old constants
pfrazee Apr 1, 2019
746808a
Switch from /data/feed to /data/posts
pfrazee Apr 1, 2019
a931449
Rename the unwalled-garden-followgraph API to unwalled-garden-graph
pfrazee Apr 1, 2019
48bc710
Update bookmark records to use tag arrays
pfrazee Apr 1, 2019
fe9c96d
Switch bookmark.public to bookmark.isPublic to avoid JS parsing issues
pfrazee Apr 1, 2019
351528c
Include missing 'createdAt' attribute in bookmarks API
pfrazee Apr 2, 2019
3f76ca7
Filter out empty tags from bookmarks
pfrazee Apr 2, 2019
cc46c5c
Update crawler suggestions
pfrazee Apr 5, 2019
1b5c563
Bump deps
pfrazee Apr 5, 2019
af51f1e
Download the source archive for forks
pfrazee Apr 8, 2019
e182790
Handle input URLs better in forks
pfrazee Apr 8, 2019
e2c92bd
Update default bookmarks
pfrazee Apr 8, 2019
a828635
Update favicons
pfrazee Apr 8, 2019
e6c82cb
Ensure /data exists on follow
pfrazee Apr 8, 2019
5cdc7d5
Add sortBy, offset, limit, and reverse options to bookmarks.query web…
pfrazee Apr 10, 2019
81380bd
Remove leftover primary key declaration
pfrazee Apr 10, 2019
aff2529
Ignore failures to track size
pfrazee Apr 10, 2019
a208287
Fix search-character escaping
pfrazee Apr 11, 2019
e27cf0c
Keep beaker:// sites out of the search index for past visits
pfrazee Apr 11, 2019
05e79b7
Fix bug in fallback pages
pfrazee Apr 16, 2019
7680b21
Add unwalled.garden/reactions
pfrazee Apr 17, 2019
3d7ad4a
Expand supported reaction emojis
pfrazee Apr 17, 2019
3f3151a
Add assets crawler
pfrazee Apr 19, 2019
db5ca1b
Update crawler suggestions hardcoded values
pfrazee Apr 19, 2019
2ab8961
Only return sites with multiple visits in history search
pfrazee Apr 19, 2019
0aeefaf
Move dat asset crawling into the dat codepaths so that all loaded dat…
pfrazee Apr 19, 2019
21225ad
Reduce crawler suggestions from library sections to just the library
pfrazee Apr 20, 2019
f9d2f78
Add .record to bookmarks output
pfrazee Apr 20, 2019
49992ba
Emit 'user-thumb-changed' event from users api
pfrazee Apr 21, 2019
be2cc22
Adjust default bookmarks
pfrazee Apr 22, 2019
91a5401
Add reactions.query() web api
pfrazee Apr 24, 2019
818f995
Add graph.query() web api
pfrazee Apr 24, 2019
6bf9c73
Fix: include record.url in reactions query output
pfrazee Apr 24, 2019
d02a6b4
Merge branch 'master' into blue
pfrazee Apr 26, 2019
e26ca68
Fix library archives query data munging
pfrazee May 1, 2019
a194346
Dat protocol now redirects to library or beaker.social if no html int…
pfrazee May 4, 2019
8e8afa7
Remove reactions from posts web api
pfrazee May 13, 2019
d4e9fda
Bump [email protected]
pfrazee May 14, 2019
540ef6c
Bump [email protected]
pfrazee May 14, 2019
2ff6ca5
Bump deps
pfrazee May 14, 2019
72f1043
Fix: watch user assets and bookmarks on add
pfrazee May 14, 2019
c0a4765
Fix: properly handle bookmark not found
pfrazee Jun 11, 2019
8177930
Bump [email protected]
pfrazee Jun 11, 2019
27f6733
Refactor unwalled-garden-graph Web API -> unwalled-garden-follows
pfrazee Jun 12, 2019
b142a62
Refactor unwalled-garden-posts to new schema and API definitions
pfrazee Jun 12, 2019
eeee5b1
Update the profiles web API to match docs
pfrazee Jun 12, 2019
9d38cc5
Update the reactions Web API to match docs
pfrazee Jun 12, 2019
e64e906
Add unwalled-garden-comments web api
pfrazee Jun 16, 2019
9497109
Unify web api semantics: delete -> remove
pfrazee Jun 17, 2019
bcced89
Change the follows API to use a topic param instead of subject
pfrazee Jun 17, 2019
c9c519c
Fix users query for followed users (subject -> topic)
pfrazee Jun 17, 2019
56b2924
Change crawled bookmarks to use denormalized tags
pfrazee Jun 17, 2019
5b56cee
Update some search queries
pfrazee Jun 17, 2019
ac10df9
Update bookmark unwalled-garden schema away from .content field
pfrazee Jun 17, 2019
ee3b91c
Linter
pfrazee Jun 17, 2019
aed7514
Implement unwalled-garden-votes API
pfrazee Jun 17, 2019
4b44713
Add unwalled-garden-discussions web api
pfrazee Jun 18, 2019
5440b0d
Add unwalled-garden-media web api
pfrazee Jun 18, 2019
73bad49
Add missing pragma
pfrazee Jun 18, 2019
0fa849a
Add discussions FTS
pfrazee Jun 18, 2019
7135846
Normalize URLs read by crawler
pfrazee Jun 18, 2019
e6484a7
Add unwalled-garden-tags web api
pfrazee Jun 25, 2019
83b4b7e
Fix tags filters
pfrazee Jun 25, 2019
b64f411
Add navigator beakerSelectDatArchiveDialog and beakerSelectFileDialog
pfrazee Jun 25, 2019
3b305bb
Add navigator.beakerSaveFileDialog
pfrazee Jun 25, 2019
3abb09e
Add getArchiveNetworkStats to dat daemon
pfrazee Jun 26, 2019
0530338
Fix: Delete vote when set to 0
pfrazee Jun 26, 2019
fa4a43b
Fix: add getArchiveNetworkStats to library
pfrazee Jun 26, 2019
0dd1baf
Remove log
pfrazee Jun 26, 2019
6792d3b
Dat protocol serving: go back to simple files listing when no index.h…
pfrazee Jun 26, 2019
8b284c0
Fix: massage comment replies in threads
pfrazee Jun 27, 2019
7d1d1cc
Remove old user-session web api
pfrazee Jun 29, 2019
cdfec19
Change 'profiles' web api to 'unwalled-garden-profiles'
pfrazee Jun 29, 2019
ac78acd
Add multiple-user support and beaker.users API
pfrazee Jul 1, 2019
b80bdb6
Switch back to main spellchecker (it's working again!)
pfrazee Jul 2, 2019
15e9626
Add installed-applications table and internal web api
pfrazee Jul 4, 2019
8471c67
Fix to app permissions check
pfrazee Jul 4, 2019
83b9e88
Add 'is installed and enabled' check to app perms
pfrazee Jul 4, 2019
1a0cd13
Add navigator.getApplicationState and beaker.sitedata.getAppPermission
pfrazee Jul 4, 2019
6565ee1
Add beaker.applications.requestInstall
pfrazee Jul 6, 2019
9b2895a
Generate dat.json manifests based on type
pfrazee Jul 6, 2019
66bde89
Change unwalled.garden/application identifier to application
pfrazee Jul 9, 2019
5b3d8c3
Introduce app perms, temporarily deprecate media and discussions APIs
pfrazee Jul 10, 2019
e9a9766
Add support and tracking for dat archive DNS names
pfrazee Jul 14, 2019
f885f18
Fix: dont return null records from follow read calls
pfrazee Jul 15, 2019
fcc18a0
Small crawler fixes
pfrazee Jul 15, 2019
ad8b256
Tolerate DNS names in more dat library codepaths
pfrazee Jul 15, 2019
1889f4f
Correctly handle timeouts during crawling
pfrazee Jul 15, 2019
2de515d
Use dns name on users
pfrazee Jul 15, 2019
1b0d96b
Track the 'primary url' (assigned domain in manifest) more closely an…
pfrazee Jul 15, 2019
db3000c
Expose an applications API
pfrazee Jul 17, 2019
82c5371
Update listSuggestions for current types
pfrazee Jul 26, 2019
b5100e2
Add beaker.browser.toggleSidebar
pfrazee Jul 26, 2019
2127825
Remove quad9 from dns providers (it was failing unwalled.garden lookups)
pfrazee Jul 26, 2019
0e28de5
Add beaker.browser. moveWindow and maximizeWindow
pfrazee Jul 26, 2019
bf42113
Add beaker.browser.setWindowDragModeEnabled
pfrazee Jul 27, 2019
2be4dc1
Factor out dat-serve-resolve-path and remove markdown styles
pfrazee Jul 27, 2019
d8957d1
Add beaker.browser toggleLiveReloading() and gotoUrl()
pfrazee Jul 27, 2019
d1b1cd1
Fix handling of visiting +preview on a site that doesnt have it enabled
pfrazee Aug 2, 2019
b97a59d
Fix: ug web apis for user with a domain name now work
pfrazee Aug 2, 2019
d6daf79
Bump deps, temporarily use sqlite fork that builds on electron 6
pfrazee Aug 2, 2019
5109f2e
Go back to sqlite3 main package
pfrazee Aug 2, 2019
5e61d56
Fix syntax error in profile-data.sql.js
pfrazee Aug 2, 2019
28df9f9
Add simple theme/template.html serving
pfrazee Aug 4, 2019
faccc14
Fix misnamed fn
pfrazee Aug 4, 2019
59d9f08
Fix: catch failed reads when confirming domain names
pfrazee Aug 5, 2019
ff9db2f
Update search API suggestions to use themes and remove apps & templates
pfrazee Aug 5, 2019
a7fb77d
Drop the beaker* prefix on navigator methods
pfrazee Aug 5, 2019
e07681f
Disable navigator.getApplicationState
pfrazee Aug 5, 2019
f5927e4
Move from app perms to session perms, add navigator.session.* web api
pfrazee Aug 6, 2019
1947298
Change theme-serving to a simple js/css injection
pfrazee Aug 8, 2019
53e039a
Add tools for sidebar fetching of site sessions
pfrazee Aug 8, 2019
7b8eb62
Add beaker.browser.openSidebar
pfrazee Aug 12, 2019
7360723
Allow writes via DatArchive to unsaved archives
pfrazee Aug 13, 2019
88f9018
Bump package-lock.json
pfrazee Aug 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Blue Link Labs
Copyright (c) 2019 Blue Link Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ await beakerCore.setup({
exportAPI(apiName, apiManifest, apiImpl, [guardFn])
},
downloadsWebAPI: {...},
browserWebAPI: {...}
browserWebAPI: {...},
userSessionAPI: {
getFor(webContents) {/*...*/}
}
})

// setup the protocol handler
Expand Down Expand Up @@ -115,6 +118,10 @@ debug('dat-related stuff')

### `dat.debug`

### `crawler`

### `users`

## API (@beaker/core/webview)

### `setup()`
69 changes: 69 additions & 0 deletions applications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
const sessionPerms = require('./lib/session-perms')
const knex = require('./lib/knex')
const db = require('./dbs/profile-data-db')
const sitedataDb = require('./dbs/sitedata')
const dat = require('./dat')

// typedefs
// =

/**
* @typedef {Object} ApplicationPermission
* @prop {string} id
* @prop {string[]} caps
* @prop {string} description
*
* @typedef {Object} ApplicationState
* @prop {string} url
* @prop {ApplicationPermission[]} permissions
* @prop {boolean} installed
* @prop {boolean} enabled
* @prop {string} installedAt
*/

// exported api
// =

/**
* @param {Object} opts
* @param {number} opts.userId
* @param {string} opts.url
* @returns {Promise<ApplicationState>}
*/
exports.getApplicationState = async function ({userId, url}) {
url = await dat.library.getPrimaryUrl(url)
var record = await db.get(knex('installed_applications').where({userId, url}))
if (record) {
record.installed = true
} else {
record = {
url,
installed: false,
enabled: false,
installedAt: null
}
}
record.permissions = await sitedataDb.getAppPermissions(record.url)
return massageAppRecord(record)
}

// internal methods
// =

/**
* @param {Object} record
* @returns {ApplicationState}
*/
function massageAppRecord (record) {
return {
url: record.url,
permissions: Object.entries(record.permissions).map(([id, caps]) => ({
id,
caps,
description: sessionPerms.describePerm(id, caps)
})),
installed: record.installed,
enabled: Boolean(record.enabled),
installedAt: record.createdAt ? (new Date(record.createdAt)).toISOString() : null
}
}
Loading