Move API-based formatting logic to wikibase.RepoApi.FormatValueCaller

Change-Id: I9800efbc4303d35da46ed97ee6722301b46ff552
Inject API into parsers

Change-Id: I61ad58f8ecc83b9223fcb4becdc58e1e396945e7
Remove ResourceLoader dependencies to jquery and mediawiki

Bug: 69468
Change-Id: Ieffc2f592bd044229ccf50bf48940e91d5659923
Move wbparsevalue and wbformatvalue calls to RepoApi

Change-Id: I4ab8d05a8b1e62387db06ccc7d5a52b72b6c96ec
Move handling of remote APIs out of RepoApi

Change-Id: I99c656f11ec636d879b84c3f2d88983a8d239f45
Make getLocationAgnosticMwApi work if both APIs are on the same domain

and CORS is not configured.

Change-Id: I4564f6ba3c342a6365acddb4682b8ed38ea0f650
Clean up API-based parsing code in JS

* Move length check to ApiBasedValueParser, since it tries to take the first
  element afterwards
* Always return an Error, possibly RepoApiError in ParseValueCaller
* Stop passing the whole API response as HTML error message in some cases in
  ParseValueCaller
* Correctly pass error code in ParseValueCaller with bad data values
* Use RepoApiError for error message parsing in ParseValueCaller
* Don't try to find an error message in ApiBasedValueParser, since
  ParseValueCaller is doing that now
* Stop handling the response if promise has been rejected in ParseValueCaller

Change-Id: I2a93535469ebc3b7d850cf6c7d20bf54aa8066cd
Move datavalue parsing to ApiBasedValueParser

Change-Id: I263d7efedf6bc21b8ae888fed5a48d2729c40de2
Use RepoApiError in API-based formatting

Change-Id: I39f759b714e700edfff813252769cdcff38603f8
Make resource definitions work from /vendor/, too

Change-Id: I59ac7b8f3e48d6098d53875abcb8811fc36f5892
Actually make resources work from vendor

Change-Id: Iaa6e344ea897a9a399dee7d4618389ce176c97b4
Move RepoApi{,Error} usages

Change-Id: I5515fb02f48255e5bb7e629655f6731f1ad84581
Move RepoApi files

Change-Id: I25c5ad11352c0f869b99096894f2b0d589dc1490
Move RepoApi files

Change-Id: I25c5ad11352c0f869b99096894f2b0d589dc1490
Simplify remoteExtPath regex

The complexity of this regular expression is just not needed. Just
search for the first occurrence of `/vendor/` or `/extensions/`
and match everything from there, that's it.

Using a regex character (`+`) as delimiter does have the advantage
that it must not be repeated when calling `preg_quote`, it's always
quoted.

Change-Id: Icbcc490879779bd6de64856411fcd862454347d4
Init

Change-Id: Iddc8efb689ed2dde5e49f694ffab3563abafc946
Add 'src/' from commit '59844fb1bd658bf679027d33a917305a39378c35'

git-subtree-dir: src
git-subtree-mainline: e4b0a6228a8bd97e7b454c6338ad92d83b4f147d
git-subtree-split: 59844fb1bd658bf679027d33a917305a39378c35
Add 'tests/' from commit '7fff80ef35902135ae802ee10ecce3f7cfff9620'

git-subtree-dir: tests
git-subtree-mainline: 966289b847a38fd0b840b2aaddbdfaba165dc9bb
git-subtree-split: 7fff80ef35902135ae802ee10ecce3f7cfff9620